Skip to content

Commit 75154c6

Browse files
author
Philippe Elsass
committed
Incorrect position when generating Haxe get/set functions - now generating after last function if setting is "AfterLastPropertyDeclaration".
Possible improvement would be to locate the last "get_xxx" or "set_xxx" function, or the last function if nothing is found.
1 parent dc7379a commit 75154c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

External/Plugins/ASCompletion/Completion/ASGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,8 @@ private static void GenerateProperty(GeneratorJobType job, MemberModel member, C
12021202
{
12031203
if (location == PropertiesGenerationLocations.AfterLastPropertyDeclaration)
12041204
{
1205-
latest = FindLatest(FlagType.Getter | FlagType.Setter, 0, inClass, false, false);
1205+
if (isHaxe) latest = FindLatest(FlagType.Function, 0, inClass, false, false);
1206+
else latest = FindLatest(FlagType.Getter | FlagType.Setter, 0, inClass, false, false);
12061207
}
12071208
else latest = member;
12081209
}

0 commit comments

Comments
 (0)