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 error: String + String not a constant operation. #22408

Closed
DartBot opened this issue Feb 13, 2015 · 5 comments
Closed

String concatenation error: String + String not a constant operation. #22408

DartBot opened this issue Feb 13, 2015 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Feb 13, 2015

This issue was originally filed by @zoechi


I interpret the discussion in http://dartbug.com/15853 so that

String+ String

should be a valid constant expression but it isn't.
A regression?

Dart VM version: 1.9.0-edge.43738 (Thu Feb 12 12:05:23 2015) on "linux_x64"

see also http://stackoverflow.com/questions/28494336

@DartBot
Copy link
Author

DartBot commented Feb 13, 2015

This comment was originally written by @zoechi


At runtime I get

expression is not a valid compile-time constant
  const String HOME_EXPECTED = IP_ADDRESS + "index.html";

The analyzer has another problem with this statement. I'm going to create a new issue for that.


Added Triaged label.

@lrhn
Copy link
Member

lrhn commented Feb 13, 2015

The spec does say that the string+string expression should be a compile time constant. It's a VM error that it isn't being treated as such.


Removed Area-Language, Analyzer-Constants labels.
Added Area-VM label.

@floitsch
Copy link

This is a partial dupe of issue #21000 (which should be reopened).

@iposva-google
Copy link
Contributor

cc @mhausner.
Set owner to @crelier.
Added Accepted label.

@crelier
Copy link
Contributor

crelier commented Feb 18, 2015

Fixed at r43831.


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Feb 18, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

6 participants