-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
typer.ml Assertion not failed #3974
Comments
We have to talk about that whole minimal reproducible example thing again... ;) class Main { static function main() { var s = "foo"; var s2 = '\t${s.}'; } }
class UserMove { }
|
I'm not sure what's going on here, but it's not a regression so I prefer leaving it for after 3.2. |
There's something wrong with the position that is passed to Sadly the relevant string interpolation code is not exactly easy to follow. |
|
@ncannasse: Should "\t" count as 1 or 2 "characters" in this context? I think the issue is that the IDE sees it as 2, but to to lexer it's just one and the completion position is then off. |
\t should always be one character. Actually in all positions we're talking about byte position in file, so for instance "é" in UTF8 takes 2 bytes. |
This is actually the same issue as #2244. The problem in both situations is that we run IMO we shouldn't run unescape until we actually type the string. That might lead to some macros breaking, but it's simply the right thing to do. |
I tried fixing this but it's a bit of a mess. The |
The sample does not crash the compiler anymore. |
I'm working on a project an out of the blue i get this error,
It's hard to reproduce and to share all related code, but this is the setup:
Where XXXXX I request the code completion (in Windows, FlashDevelop, ctrl-space) and the error appears.
I'm using Haxe 3.1.3
The text was updated successfully, but these errors were encountered: