Skip to content

Commit

Permalink
no warning when haxeui_dont_impose_base_class
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 25, 2023
1 parent b4ba6e5 commit 48f7554
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions haxe/ui/macros/ComponentMacros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,11 @@ class ComponentMacros {
var c:ComponentInfo = buildComponentFromFile(builder, codeBuilder, resourcePath, buildData, "this", false);
var superClass:String = builder.superClass.t.toString();
var rootType = ModuleMacros.resolveComponentClass(c.type, c.namespace);
#if !haxeui_dont_impose_base_class
if (haxe.ui.util.RTTI.hasSuperClass(builder.fullPath, rootType) == false) {
Context.warning('The class hierarchy of "${builder.fullPath}" does not contain the root node of "${resourcePath}" (${rootType}) - this may have unintended consequences', pos);
}
#end

for (id in buildData.namedComponents.keys()) {
var safeId:String = StringUtil.capitalizeHyphens(id);
Expand Down

0 comments on commit 48f7554

Please sign in to comment.