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

Delete of undefined "type" returns weird 115 error #354

Closed
Bara opened this issue Aug 24, 2019 · 1 comment
Closed

Delete of undefined "type" returns weird 115 error #354

Bara opened this issue Aug 24, 2019 · 1 comment

Comments

@Bara
Copy link
Contributor

Bara commented Aug 24, 2019

Tested with SourcePawn Compiler 6431.

Error:

error 017: undefined symbol "regex2"
error 115: cannot use delete, type ::ft:regex2:27972:27972 has no destructor

Test Case:

#include <regex>

public void OnPluginStart()
{
    Regex rRegex = new Regex("");
    delete regex2;
}

I don't know if this errors should be normal, but looks pretty weird.

dvander added a commit that referenced this issue Sep 1, 2019
dvander added a commit that referenced this issue Sep 8, 2019
The two-pass parser treats any unknown variable as a function, and if
those leak into expressions, it can lead to weird error messages.

Bug: issue #354
Test: manual test
dvander added a commit that referenced this issue Sep 8, 2019
The two-pass parser treats any unknown variable as a function, and if
those leak into expressions, it can lead to weird error messages.

Bug: issue #354
Test: manual test
@dvander
Copy link
Member

dvander commented Sep 8, 2019

Thanks for the report - the error will print it as a function now. That's about as good as it can get with the current parser (which assumes all unknown names are functions).

@dvander dvander closed this as completed Sep 8, 2019
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