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:
parent
eea4e54a17
commit
749a91af39
@ -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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user