Handle initializer case in FullyQualifiedSyntax

- Prevents source generators from fully qualifying names being assigned to within an object initializer
- Adds ResourceTextureWithInitializer test cases to ExportedFields and ExportedProperties

Co-Authored-By: Paul Joannon <437025+paulloz@users.noreply.github.com>
Co-Authored-By: Paviel Kraskoŭski <kraskovskiy94@gmail.com>
This commit is contained in:
AbsoluteMoose
2025-11-16 22:46:00 -06:00
parent ef34c3d534
commit 3b4b0c530e
7 changed files with 44 additions and 6 deletions
@@ -88,6 +88,7 @@ public partial class ExportedFields : GodotObject
// Classes
[Export] private GodotObject _fieldGodotObjectOrDerived;
[Export] private Godot.Texture _fieldGodotResourceTexture;
[Export] private Godot.Texture _fieldGodotResourceTextureWithInitializer = new() { ResourceName = "" };
[Export] private StringName _fieldStringName = new StringName("foo");
[Export] private NodePath _fieldNodePath = new NodePath("foo");
[Export] private Rid _fieldRid;
@@ -207,6 +207,7 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
// Classes
[Export] private GodotObject PropertyGodotObjectOrDerived { get; set; }
[Export] private Godot.Texture PropertyGodotResourceTexture { get; set; }
[Export] private Godot.Texture PropertyGodotResourceTextureWithInitializer { get; set; } = new() { ResourceName = "" };
[Export] private StringName PropertyStringName { get; set; } = new StringName("foo");
[Export] private NodePath PropertyNodePath { get; set; } = new NodePath("foo");
[Export] private Rid PropertyRid { get; set; }