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

Exceeding a certain size of code causes misleading compiler errors, e.g. "not allowed in identifier" and "not a valid token" #730

Open
thinkingerrol opened this issue Jul 29, 2019 · 0 comments

Comments

@thinkingerrol
Copy link

Take this benign code as an example: https://run.dlang.io/gist/286241cd20de0dd1d634d46e1a6da1c3?args=-Xi%3DcompilerInfo

I'm getting the following errors, some of them even mentioning symbols such as "cannot" which are not in my code:

onlineapp.d(1): Error: char 0x0090 not allowed in identifier
onlineapp.d(1): Error: character 0x90 is not a valid token
onlineapp.d(1): Error: character 0x03 is not a valid token
onlineapp.d(1): Error: character 0x04 is not a valid token
onlineapp.d(1): Error: character 0xb8 is not a valid token
onlineapp.d(1): Error: semicolon expected, not @
onlineapp.d(1): Error: character 0x20ac is not a valid token
onlineapp.d(1): Error: character 0x0e is not a valid token
onlineapp.d(1): Error: character 0x1f is not a valid token
onlineapp.d(1): Error: character 0x0e is not a valid token
onlineapp.d(1): Error: character 0xb4 is not a valid token
onlineapp.d(1): Error: character 0xb8 is not a valid token
onlineapp.d(1): Error: character 0x01 is not a valid token
onlineapp.d(1): Error: multiple ! arguments are not allowed
onlineapp.d(1): Error: semicolon expected, not cannot
onlineapp.d(1): Error: semicolon expected, not run
onlineapp.d(1): Error: no identifier for declarator run
onlineapp.d(1): Error: declaration expected, not in
onlineapp.d(3): Error: character 0x01 is not a valid token
onlineapp.d(3): Error: character 0x03 is not a valid token

These errors disappear if I remove a single byte from the source code, be it from a comment or the unnecessary space before the semicolon in the body of main. They also disappear if I remove the "-Xi=compilerInfo" argument, but even with no arguments reappear again after adding a number of bytes to the source code.

I have to say I've just been experimenting with the multiple-files (HAR) feature and have a feeling I might have thereby caused some kind of unwanted state buildup.

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

1 participant