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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 8479049: Allow for instance checking of methods and function aliases. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.annotations.VisibleForTesting; 7 import com.google.common.annotations.VisibleForTesting;
8 import com.google.common.collect.Sets; 8 import com.google.common.collect.Sets;
9 import com.google.dart.compiler.DartCompilationPhase; 9 import com.google.dart.compiler.DartCompilationPhase;
10 import com.google.dart.compiler.DartCompilerContext; 10 import com.google.dart.compiler.DartCompilerContext;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 @Override 197 @Override
198 public Element visitUnit(DartUnit unit) { 198 public Element visitUnit(DartUnit unit) {
199 for (DartNode node : unit.getTopLevelNodes()) { 199 for (DartNode node : unit.getTopLevelNodes()) {
200 node.accept(this); 200 node.accept(this);
201 } 201 }
202 return null; 202 return null;
203 } 203 }
204 204
205 @Override 205 @Override
206 public Element visitFunctionTypeAlias(DartFunctionTypeAlias alias) { 206 public Element visitFunctionTypeAlias(DartFunctionTypeAlias alias) {
207 resolveFunctionAlias(alias);
207 return null; 208 return null;
208 } 209 }
209 210
210 @Override 211 @Override
211 public Element visitClass(DartClass cls) { 212 public Element visitClass(DartClass cls) {
212 assert currentMethod == null : "nested class?"; 213 assert currentMethod == null : "nested class?";
213 ClassElement classElement = cls.getSymbol(); 214 ClassElement classElement = cls.getSymbol();
214 try { 215 try {
215 classElement.getAllSupertypes(); 216 classElement.getAllSupertypes();
216 } catch (CyclicDeclarationException e) { 217 } catch (CyclicDeclarationException e) {
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 ClassElement nextClass = (ClassElement) nextConstructorElement.getEnclos ingElement(); 1414 ClassElement nextClass = (ClassElement) nextConstructorElement.getEnclos ingElement();
1414 ClassElement currentClass = (ClassElement) constructor.getEnclosingEleme nt(); 1415 ClassElement currentClass = (ClassElement) constructor.getEnclosingEleme nt();
1415 if (nextClass.getName().equals(currentClass.getName())) { 1416 if (nextClass.getName().equals(currentClass.getName())) {
1416 return nextConstructorElement; 1417 return nextConstructorElement;
1417 } 1418 }
1418 } 1419 }
1419 } 1420 }
1420 return null; 1421 return null;
1421 } 1422 }
1422 } 1423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698