Skip to content

String interpolation not working in combination with an attribute of an instance (<object>.<attribute>) #3256

Closed
@DartBot

Description

@DartBot

This issue was originally filed by andreasschr...@gmail.com


What steps will reproduce the problem?

  1. Just execute the following
    main() {
      Example e = new Example('myString');
      print('string: $e.test');
    }

class Example{
 String test;
 Example(this.test);
}

What is the expected output? What do you see instead?
Excpected is: "string: myString"
Ootput is: "string: Object.test"

What version of the product are you using? On what operating system?
I used the dartboard at dartlang.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-as-intendedClosed as the reported issue is expected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions