22ab27256e
null.runtimeType.toString() returned "JSNull". reflect(null).type.superInterfaces mirrored on the interceptor and contained Null in the list. reflect(null).getField was trying to cache the getters on the object and failed. BUG= http://dartbug.com/16741 BUG= http://dartbug.com/12482 R=karlklose@google.com, kasperl@google.com Committed: https://code.google.com/p/dart/source/detail?r=32650 Reverted: https://code.google.com/p/dart/source/detail?r=32652 Committed: https://code.google.com/p/dart/source/detail?r=32654 Reverted: https://code.google.com/p/dart/source/detail?r=32665 Review URL: https://codereview.chromium.org//161333002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32692 260f80e4-7a28-3924-810f-c04153c831b5
23 lines
749 B
Dart
23 lines
749 B
Dart
// Copyright (c) 2014, 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.
|
|
// Second dart test program.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
// Magic incantation to avoid the compiler recognizing the constant values
|
|
// at compile time. If the result is computed at compile time, the dynamic code
|
|
// will not be tested.
|
|
confuse(x) {
|
|
try {
|
|
if (new DateTime.now().millisecondsSinceEpoch == 42) x = 42;
|
|
throw [x];
|
|
} on dynamic catch (e) { return e[0]; }
|
|
return 42;
|
|
}
|
|
|
|
main() {
|
|
Expect.equals("Null", null.runtimeType.toString());
|
|
Expect.equals("Null", confuse(null).runtimeType.toString());
|
|
}
|