dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.2k stars 1.57k forks source link

resolver does not add field to resolved elements if it is used only in constructor that is called via redirection #6894

Closed DartBot closed 9 years ago

DartBot commented 11 years ago

This issue was originally filed by smok@google.com


Example source (simplification of tests/language/const_factory_redirection_test.dart):

abstract class I {   factory I(d) = A; } class A implements I {   final int f;   A(this.f); } main() {   new I(5); }

resolvedElements: field(NoSuchMethodError#_arguments) field(NoSuchMethodError#_namedArguments) function(I#I) generative_constructor(NoSuchMethodError#NoSuchMethodError) field(NoSuchMethodError#_existingArgumentNames) generative_constructor(Object#Object) function(main) origin function(Object#noSuchMethod) generative_constructor(A#A) field(NoSuchMethodError#_receiver) field(NoSuchMethodError#_memberName)

(no "f" field)

DartBot commented 11 years ago

This comment was originally written by ngeoffray@google.com


Added this to the M2 milestone.

dgrove commented 11 years ago

Added Triaged label.

peter-ahe-google commented 11 years ago

Added Started label.

peter-ahe-google commented 11 years ago

Issue #6902 has been merged into this issue.

peter-ahe-google commented 11 years ago

https://codereview.chromium.org/11415151/

peter-ahe-google commented 11 years ago

Fixed in r15443.


Added Fixed label.