Skip to content

String interpolation problem #2595

Closed
Closed
@clayberg

Description

@clayberg

[user feedback]

Little string interpolation problem...
Take a look at screenshot: http://i.imm.io/m3RY.png
The string is marked as error in the editor, but it runs well.
////////////////////////////////////////////////////////////////////////////////////
Editor Version: 6528
////////////////////////////////////////////////////////////////////////////////////
OS: Windows 7 - amd64 (6.1)
SDK installed = true
Dartium installed = true

Activity

lrhn

lrhn commented on Apr 17, 2012

@lrhn
Member

The surprising thing is that it runs.
The code is:
 print('Previous value: $window.localStorage['test']');
if I read it correctly. The interpolation is only ${window}, and the rest of the string isn't part of it. To be correct, it should be:
 print('Previous value: ${window.localStorage['test']}');
As it's written, the string ends at the ' before test, and is followed by the raw identifier 'test', which isn't valid at that position.

How do you run it, and what result does it give?

scheglov

scheglov commented on Apr 20, 2012

@scheglov
Contributor

See comment 1.


Added Invalid label.

added a commit that references this issue on Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

closed-invalidClosed as we don't believe the reported issue is generally actionable

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @scheglov@lrhn@clayberg

      Issue actions

        String interpolation problem · Issue #2595 · dart-lang/sdk