| Index: runtime/lib/errors_patch.dart
|
| diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
|
| index f26d4d4e238feb6c54a9618a043040da2ff5bd8e..595f6f8620bcde3ab34e253f191b7a08fa6cdd59 100644
|
| --- a/runtime/lib/errors_patch.dart
|
| +++ b/runtime/lib/errors_patch.dart
|
| @@ -395,3 +395,21 @@ class _CompileTimeError extends Error {
|
| _CompileTimeError(this._errorMsg);
|
| String toString() => _errorMsg;
|
| }
|
| +
|
| +dynamic _classRangeAssert(int position, dynamic instance, _Type type, int cid,
|
| + int lowerLimit, int upperLimit) {
|
| + if ((cid < lowerLimit || cid > upperLimit) && instance != null) {
|
| + _TypeError._throwNew(position, instance, type, " in type cast", null);
|
| + }
|
| +
|
| + return instance;
|
| +}
|
| +
|
| +dynamic _classIdEqualsAssert(
|
| + int position, dynamic instance, _Type type, int cid, int otherCid) {
|
| + if (cid != otherCid && instance != null) {
|
| + _TypeError._throwNew(position, instance, type, " in type cast", null);
|
| + }
|
| +
|
| + return instance;
|
| +}
|
|
|