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

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

Issue 18670003: Remove support for conflicting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 5 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: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 91f3f44adf75758442bf29c325bdd8086ecfaed5..58c23443c05a05cf1ada8e72d587754292e46156 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1409,7 +1409,7 @@ class SynthesizedConstructorElementX extends FunctionElementX {
SynthesizedConstructorElementX.forDefault(Element enclosing,
Compiler compiler)
- : super(enclosing.name, ElementKind.GENERATIVE_CONSTRUCTOR,
+ : super(const SourceString(''), ElementKind.GENERATIVE_CONSTRUCTOR,
Modifiers.EMPTY, enclosing),
target = null {
// TODO(karlklose): get rid of the fake AST.
@@ -1798,16 +1798,7 @@ abstract class BaseClassElementX extends ElementX implements ClassElement {
// make noMatch a required argument. Peter's suspicion is that most
// callers of this method would benefit from using the noMatch method.
Element lookupConstructor(Selector selector, [Element noMatch(Element)]) {
- SourceString normalizedName;
- SourceString className = this.name;
- SourceString constructorName = selector.name;
- if (constructorName != const SourceString('')) {
- normalizedName = Elements.constructConstructorName(className,
- constructorName);
- } else {
- normalizedName = className;
- }
- Element result = localLookup(normalizedName);
+ Element result = localLookup(selector.name);
return validateConstructorLookupResults(selector, result, noMatch);
}

Powered by Google App Engine
This is Rietveld 408576698