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

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

Issue 15689009: Type check try statements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename variable. Created 7 years, 7 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 | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 1452eff873768f2ada6745a244b7e1629eb496ff..5afc41de52b0917dd90914622c35f5616d25a993 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -318,6 +318,7 @@ abstract class Compiler implements DiagnosticListener {
ClassElement typeClass;
ClassElement mapClass;
ClassElement symbolClass;
+ ClassElement stackTraceClass;
// Initialized after mirrorSystemClass has been resolved.
FunctionElement symbolConstructor;
@@ -680,6 +681,7 @@ abstract class Compiler implements DiagnosticListener {
listClass = lookupCoreClass('List');
typeClass = lookupCoreClass('Type');
mapClass = lookupCoreClass('Map');
+ stackTraceClass = lookupCoreClass('StackTrace');
if (!missingCoreClasses.isEmpty) {
internalErrorOnElement(coreLibrary,
'dart:core library does not contain required classes: '
@@ -1109,7 +1111,9 @@ abstract class Compiler implements DiagnosticListener {
if (Elements.isErroneousElement(element)) {
element = element.enclosingElement;
}
- if (element.position() == null && !element.isCompilationUnit()) {
+ if (element.position() == null &&
+ !element.isLibrary() &&
+ !element.isCompilationUnit()) {
// Sometimes, the backend fakes up elements that have no
// position. So we use the enclosing element instead. It is
// not a good error location, but cancel really is "internal
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698