| Index: runtime/lib/null_patch.dart
|
| diff --git a/runtime/lib/null_patch.dart b/runtime/lib/null_patch.dart
|
| index 312804e6b84c9dbb8e47654d25fc6f2ccbf62dd3..b3b9f76f4358fa60d4099d4b0b831374ba2aca65 100644
|
| --- a/runtime/lib/null_patch.dart
|
| +++ b/runtime/lib/null_patch.dart
|
| @@ -14,5 +14,12 @@
|
| int get hashCode => _HASH_CODE;
|
| int get _identityHashCode => _HASH_CODE;
|
|
|
| + @patch noSuchMethod(Invocation invocation) {
|
| + String name = internal.Symbol.getName(invocation.memberName);
|
| + if (invocation.isMethod)
|
| + throw new NullDereferenceError('$name() was called on a null value.');
|
| + throw new NullDereferenceError('$name was accessed on a null value.');
|
| + }
|
| +
|
| String toString() => 'null';
|
| }
|
|
|