OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |