Skip to content

Commit

Permalink
Merge pull request #476 from Gulvan0/patch-9
Browse files Browse the repository at this point in the history
Support abstract classes in the hierarchy (macros)
  • Loading branch information
ianharrigan authored Aug 10, 2022
2 parents fbe8a15 + eb78db0 commit 67c5992
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion haxe/ui/macros/Macros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ class Macros {
buildStyles(builder);
buildBindings(builder);

if (builder.hasInterface("haxe.ui.core.IClonable")) {
if (builder.hasInterface("haxe.ui.core.IClonable") && !builder.isAbstractClass) {
buildClonable(builder);
}

Expand Down
4 changes: 4 additions & 0 deletions haxe/ui/macros/helpers/ClassBuilder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class ClassBuilder {
}
}

public var isAbstractClass(get, null):Bool;
private function get_isAbstractClass():Bool {
return #if (haxe_ver >= 4.2) classType.isAbstract #else false #end;
}

public function findField(name:String):Field {
var r = null;
Expand Down

0 comments on commit 67c5992

Please sign in to comment.