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

Unified Diff: runtime/lib/errors_patch.dart

Issue 53583003: Implement latest spec changes regarding malformed types (see issue 14006): (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
===================================================================
--- runtime/lib/errors_patch.dart (revision 29604)
+++ runtime/lib/errors_patch.dart (working copy)
@@ -37,7 +37,7 @@
patch class TypeError extends AssertionError {
TypeError._create(String url, int line, int column,
this._srcType, this._dstType, this._dstName,
- this._boundError)
+ this._errorMsg)
: super._create("is assignable", url, line, column);
static _throwNew(int location,
@@ -48,12 +48,12 @@
native "TypeError_throwNew";
String toString() {
- String str = (_boundError != null) ? _boundError : "";
+ String str = (_errorMsg != null) ? _errorMsg : "";
if ((_dstName != null) && (_dstName.length > 0)) {
str = "${str}type '$_srcType' is not a subtype of "
"type '$_dstType' of '$_dstName'.";
} else {
- str = "${str}malbounded type used.";
+ str = "${str}malformed type used.";
}
return str;
}
@@ -61,19 +61,19 @@
final String _srcType;
final String _dstType;
final String _dstName;
- final String _boundError;
+ final String _errorMsg;
}
patch class CastError extends Error {
CastError._create(this._url, this._line, this._column,
this._srcType, this._dstType, this._dstName,
- this._boundError);
+ this._errorMsg);
// A CastError is allocated by TypeError._throwNew() when dst_name equals
// Exceptions::kCastErrorDstName.
String toString() {
- String str = (_boundError != null) ? _boundError : "";
+ String str = (_errorMsg != null) ? _errorMsg : "";
str = "${str}type '$_srcType' is not a subtype of "
"type '$_dstType' in type cast.";
return str;
@@ -86,7 +86,7 @@
final String _srcType;
final String _dstType;
final String _dstName;
- final String _boundError;
+ final String _errorMsg;
}
patch class FallThroughError {
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698