Better Errors - misaligned end marker due to missing : (Parser)
Compiler version
3.9.0-RC4
3.3.8
Minimized example
trait StrItrStatesM ()
type StrItrState
type StrLineStartLzy
<: StrItrState
end StrItrStatesM
Output
misaligned end marker at end StrItrStatesM
the compiler is technically correct here.
all that's missing is just a bit more work to find out and tell the 'why', here, a missing : after trait StrItrStatesM ().
such a small snippet might not be hard to tackle for users. the problem comes in when users had to do the "turn braces into idents" on a large file (200+ LOC or more) and encountered that without any hint of what they've been missing.
Expectation:
end StrItrStatesM
^^^^^^
misaligned end marker
+ Note: the line `trait StrItrStatesM ()` with the same name doesn't mark a start of a block.
+ adding colon (`:`) will turn it into one (see Optional Braces):
+
+ - trait StrItrStatesM ()
+ + trait StrItrStatesM ():
the compiler should also warn on type StrItrState; it's aligned too far to the right.
like:
+ type StrItrState
+ ^^^^^
+ line is indented too far to the right.
+
+ Note: the line `trait StrItrStatesM ()` preceding it doesn't mark a start of a block.
.
Better Errors -
misaligned end markerdue to missing:(Parser)Compiler version
3.9.0-RC43.3.8Minimized example
Output
misaligned end markeratend StrItrStatesMthe compiler is technically correct here.
all that's missing is just a bit more work to find out and tell the 'why', here, a missing
:aftertrait StrItrStatesM ().such a small snippet might not be hard to tackle for users. the problem comes in when users had to do the "turn braces into idents" on a large file (200+ LOC or more) and encountered that without any hint of what they've been missing.
Expectation:
the compiler should also warn on
type StrItrState; it's aligned too far to the right.like:
.