Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spcomp assertion on malformed if #297

Closed
Headline opened this issue Dec 18, 2018 · 2 comments
Closed

spcomp assertion on malformed if #297

Headline opened this issue Dec 18, 2018 · 2 comments

Comments

@Headline
Copy link
Member

@Headline Headline commented Dec 18, 2018

thanks to shavit for reporting this one.

Gave it a shot myself, but a solution wasn't obvious to me. Here's how to replicate

int main(){
    if(
    {
        int b = c();
    }
}
C:\Users\Micha\Desktop\alliedmodders\sourcemod\sourcepawn\build\compiler\spcomp>spcomp test.sp
SourcePawn Compiler 1.10
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

Assertion failed: lval1->sym!=NULL, file C:\Users\Micha\Desktop\alliedmodders\sourcemod\sourcepawn\compiler\expressions.cpp, line 1057
@dvander
Copy link
Member

@dvander dvander commented Dec 19, 2018

Oh gross.

@dvander
Copy link
Member

@dvander dvander commented Dec 20, 2018

The bug is that { begins an array expression, but those are only expected within initializers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants