Skip to content

Commit

Permalink
LOL this caused an infinite loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric committed Sep 25, 2021
1 parent 4aa7bdf commit 3415de2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions polymod/hscript/HScriptMacro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class HScriptMacro
var classToEvaluate:haxe.macro.Type.ClassType = cls;
while (classToEvaluate != null)
{
Context.info('Evaluating class: ${classToEvaluate.name}', p.pos);
Context.info('Evaluating class: ${classToEvaluate.name}', classToEvaluate.pos);
// Find any classes with the @:hscript annotation on the class itself.
var scriptable_meta = classToEvaluate.meta.get().find(function(m) return m.name == ":hscript");
if (scriptable_meta != null)
Expand All @@ -68,9 +68,9 @@ class HScriptMacro
}

// Move on to the next parent.
if (cls.superClass != null && cls.superClass.t != null)
if (classToEvaluate.superClass != null && classToEvaluate.superClass.t != null)
{
classToEvaluate = cls.superClass.t.get();
classToEvaluate = classToEvaluate.superClass.t.get();
}
else
{
Expand Down

0 comments on commit 3415de2

Please sign in to comment.