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

String concatenation does not work with empty string literals #2102

Closed
DartBot opened this issue Mar 12, 2012 · 3 comments
Closed

String concatenation does not work with empty string literals #2102

DartBot opened this issue Mar 12, 2012 · 3 comments
Labels
closed-as-intended Closed as the reported issue is expected behavior

Comments

@DartBot
Copy link

DartBot commented Mar 12, 2012

This issue was originally filed by [email protected]


Some adjacent string literals are not concatenated and produce a compile-time error (Dart parses them as an unterminated multi-line string literal):

main() {
  //two empty string literals not separated by a whitespace
  '''';
  """";
  @­'''';
  @­"""";
   //the first string literal is empty.
  '''a';
}

A compile-time error is produced in DartVM and Frog, r5311.
OS: Ubuntu 10.04.

@madsager
Copy link
Contributor

Added Area-Frog label.

@madsager
Copy link
Contributor

Added Triaged label.

@lrhn
Copy link
Member

lrhn commented Mar 12, 2012

This is an unterminated string literal. You are accidentally starting multiline strings where you intend an empty single line string followed by another string.

main() {
  //two empty string literals not separated by a whitespace
  '''';
//^^^ multiline string literal starts here ...
  """";
  @­'''';
// ^^^ and ends here.
// ^ Single line string starts here, and is unterminated before end of string.
  @­"""";
//^^^^ Second multline string starts here and is also unterminated.
   //the first string literal is empty.
  '''a';
}


Added AsDesigned label.

@DartBot DartBot added Type-Defect closed-as-intended Closed as the reported issue is expected behavior labels Mar 12, 2012
dart-bot pushed a commit that referenced this issue Mar 28, 2019
git log --oneline --no-decorate 3c060aae47985e9a248b850f1d0450304a5c97e3..8c363fe26f059c3063f1129adbb3c4e22a8ce954
8c363fe2 Restore default server for uploader command (#2102)
154a1419 Fix #28 -- escaping arguments as mentioned in TODO (#2093)
bb2b8b28 Remove validation for library file paths (#2067)


Change-Id: I795a8d58144003129b36e481b2693656035b2057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97638
Commit-Queue: Sigurd Meldgaard <[email protected]>
Reviewed-by: Nate Bosch <[email protected]>
Reviewed-by: Jonas Jensen <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-as-intended Closed as the reported issue is expected behavior
Projects
None yet
Development

No branches or pull requests

3 participants