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

Unified Diff: runtime/lib/error.dart

Issue 9515011: Add support for malformed types and postpone some related errors from compile (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « runtime/lib/error.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/error.dart
===================================================================
--- runtime/lib/error.dart (revision 4731)
+++ runtime/lib/error.dart (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Errors are created and thrown by DartVM only.
@@ -29,15 +29,20 @@
static _throwNew(int location,
Object src_value,
String dst_type_name,
- String dst_name)
+ String dst_name,
+ String malformed_error)
native "TypeError_throwNew";
String toString() {
+ if (malformedError != null) {
+ return malformedError;
+ }
return "'$url': Failed type check: line $line pos $column: " +
"type '$srcType' is not assignable to type '$dstType' of '$dstName'.";
}
final String srcType;
final String dstType;
final String dstName;
+ final String malformedError;
}
class FallThroughError {
@@ -70,7 +75,7 @@
"pos $column\n$failedResolutionLine\n";
static _throwNew(int token_pos) native "StaticResolutionException_throwNew";
-
+
final String failedResolutionLine;
final String url;
final int line;
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698