1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

ugly hack to stop translation segfaulting on New<byte>() code

This commit is contained in:
Kevin Glynn 2010-07-14 15:16:15 -05:00
parent eea4e54a17
commit 749a91af39

View File

@ -1259,7 +1259,7 @@ primaryExpression [object w]
{
ASTNode kosherInp = #( [INVOCATION_EXPR], #e, #args);
ASTNode retAST = null;
if (#e.Type == IDENTIFIER && symtab[#e.getText()] == null)
if (#e != null && #e.Type == IDENTIFIER && symtab[#e.getText()] == null)
{
// Is it a local method call?
ASTNode thisNode = #( [THIS, "DUMMYTHIS"] );
@ -1267,7 +1267,7 @@ primaryExpression [object w]
retAST = ResolveMethod( #( [INVOCATION_EXPR], #( [MEMBER_ACCESS_EXPR], thisNode, astFactory.dupTree(#e)),
astFactory.dupTree(#args)) );
}
else if (#e.Type == MEMBER_ACCESS_EXPR && #e.getFirstChild().getNextSibling().Type == IDENTIFIER)
else if (#e != null && #e.Type == MEMBER_ACCESS_EXPR && #e.getFirstChild().getNextSibling().Type == IDENTIFIER)
{ // resolve method call
retAST = ResolveMethod( kosherInp );
}