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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1060373003: Fix resolution of stack trace parameters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | tests/language/try_catch3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index d9cc380a9492ddd227d1dfcb808c1c684eea0a82..c37ed2c9bc97d39d4a71fd4817e3e944acdb024b 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -7687,11 +7687,6 @@ class LibraryResolver {
TypeProvider _typeProvider;
/**
- * The object used to access the types from the core library.
- */
- TypeProvider get typeProvider => _typeProvider;
-
- /**
* A table mapping library sources to the information being maintained for those libraries.
*/
HashMap<Source, Library> _libraryMap = new HashMap<Source, Library>();
@@ -7729,6 +7724,11 @@ class LibraryResolver {
Set<Library> get resolvedLibraries => _librariesInCycles;
/**
+ * The object used to access the types from the core library.
+ */
+ TypeProvider get typeProvider => _typeProvider;
+
+ /**
* Create an object to represent the information about the library defined by the compilation unit
* with the given source.
*
@@ -7917,6 +7917,18 @@ class LibraryResolver {
}
/**
+ * Resolve the identifiers and perform type analysis in the libraries in the current cycle.
+ *
+ * @throws AnalysisException if any of the identifiers could not be resolved or if any of the
+ * libraries could not have their types analyzed
+ */
+ void resolveReferencesAndTypes() {
+ for (Library library in _librariesInCycles) {
+ _resolveReferencesAndTypesInLibrary(library);
+ }
+ }
+
+ /**
* Add a dependency to the given map from the referencing library to the referenced library.
*
* @param dependencyMap the map to which the dependency is to be added
@@ -8471,18 +8483,6 @@ class LibraryResolver {
}
/**
- * Resolve the identifiers and perform type analysis in the libraries in the current cycle.
- *
- * @throws AnalysisException if any of the identifiers could not be resolved or if any of the
- * libraries could not have their types analyzed
- */
- void resolveReferencesAndTypes() {
- for (Library library in _librariesInCycles) {
- _resolveReferencesAndTypesInLibrary(library);
- }
- }
-
- /**
* Resolve the identifiers and perform type analysis in the given library.
*
* @param library the library to be resolved
@@ -13276,15 +13276,15 @@ abstract class TypeProvider {
InterfaceType get listType;
/**
- * Return a list containing all of the types that cannot be either extended or
- * implemented.
+ * Return the type representing the built-in type 'Map'.
*/
- List<InterfaceType> get nonSubtypableTypes;
+ InterfaceType get mapType;
/**
- * Return the type representing the built-in type 'Map'.
+ * Return a list containing all of the types that cannot be either extended or
+ * implemented.
*/
- InterfaceType get mapType;
+ List<InterfaceType> get nonSubtypableTypes;
/**
* Return a [DartObjectImpl] representing the `null` object.
@@ -13778,6 +13778,12 @@ class TypeResolverVisitor extends ScopedVisitor {
SimpleIdentifier stackTrace = node.stackTraceParameter;
if (stackTrace != null) {
_recordType(stackTrace, typeProvider.stackTraceType);
+ Element element = stackTrace.staticElement;
+ if (element is VariableElementImpl) {
+ element.type = typeProvider.stackTraceType;
+ } else {
+ // TODO(brianwilkerson) Report the internal error
+ }
}
return null;
}
« no previous file with comments | « no previous file | tests/language/try_catch3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698