You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
invalid_code_point reports wrong range for triple-quoted strings #46005
Triple-quoted strings seem to report invalid_code_point with the wrong range (as if the surrounding quotes length is assumed to always be 1 character):
Still reproducible at HEAD (verified on a local build of main, 3.14.0-edge.795842f).
var a ='\u{2388999}';
var b ='''\u{2388999}''';
dart analyze --format=json (offsets only):
line
escape starts at
reported range
1 ('...')
9
9–18
2 ('''...''')
34
32–41
For the triple-quoted string the reported range starts at offset 32, which is inside the opening ''' delimiter, i.e. the reported offset is two characters early — consistent with the quote length being assumed to be 1. (The same off-by-two applies to invalid_unicode_escape_u_bracket, which is reported at the same location.)
Activity
keertip commentedon Sep 22, 2026
Still reproducible at
HEAD(verified on a local build ofmain,3.14.0-edge.795842f).dart analyze --format=json(offsets only):'...')'''...''')For the triple-quoted string the reported range starts at offset 32, which is inside the opening
'''delimiter, i.e. the reported offset is two characters early — consistent with the quote length being assumed to be 1. (The same off-by-two applies toinvalid_unicode_escape_u_bracket, which is reported at the same location.)Yusufihsangorgel commentedon Oct 13, 2026
Fixed by b4b21d3 (https://dart-review.googlesource.com/c/sdk/+/553940). With 3.15.0-10.0.dev both diagnostics on the triple-quoted line now start at offset 34, the start of the escape.
DanTup commentedon Oct 13, 2026
@Yusufihsangorgel thanks!