@David-Healey ah yes that's a bit more complicated - the resolver for the first namespace doesn't work so it basically ignores the namespace qualifier and resolves the function call to itself so it creates a recursive loop.
In order to reproduce the faulty behavior without the crash you can do this:
namespace FirstNameSpace
{
const var myFunc2 = 90;
}
namespace SecondNameSpace
{
inline function myFunc()
{
if (isDefined(FirstNameSpace.myFunc))
{
Console.print("exists");
}
else
{
Console.print("doesn't exist");
}
}
}
SecondNameSpace.myFunc();
The suggested fix of passing in the current namespace is not a real fix, it might solve your immediate problem, but the correct option would be to return an undefined expression like this:
match(TokenTypes::identifier);
return parseSuffixes(new Expression(location));
then this code would work as expected (returning "doesn't exist"). However this might silently break existing code that used this construct to falsely refer to non-namespaces data through a namespace qualifier so I'm a bit hesitant to push this.