Dart semantics depends on newline encoding #23888
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
Uh oh!
There was an error while loading. Please reload this page.
The specification of multiline string is underspecified wrt. the semantics of a newlines.
This introduces the risk that the Dart semantics depends on newline encodings and thus changes upon checkout if the revision system normalizes newline encodings, as is now the case for our own dart-lang/sdk repository.
The VM normalizes occurrences of '\n', '\r', and '\r\n' to a '\n' within a multiline string—which is the preferred behavior since it removes the semantic instability.
The analyzer and dart2js takes '\n', '\r' and '\r\n' verbatim thus making them semantics vulnerable to newline encodings. See the tests in tests/language/multiline_newline_test.dart.
This bug is spec-wise related to dartbug.com/14073
@kasperl
The text was updated successfully, but these errors were encountered: