Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 15906010: Expose default constructors through ClassElement.localMembers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 732e44c31f6b819330752ee45783a8e3ded53cfa..66f97f43cbcb1d81033b7101c7db17f374d42ea6 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1959,6 +1959,8 @@ abstract class ClassElementX extends BaseClassElementX {
void setDefaultConstructor(FunctionElement constructor, Compiler compiler) {
addToScope(constructor, compiler);
+ // The default constructor, although synthetic, is part of a class' API.
+ localMembers = localMembers.prepend(constructor);
}
Link<DartType> computeTypeParameters(Compiler compiler) {
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart » ('j') | dart/tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698