Anders Holmgren
2015-08-12 22:13:08 UTC
Just noticed something blow up in 1.12 that I haven't seen before. I get a TypeMirror without an owner. Should this be possible?
My crude method is
bool isSimpleType(TypeMirror tm) =>
(tm.isTopLevel && tm.owner.simpleName == #dart.core);
The exception is
Unhandled exception:
Uncaught Error: The null object does not have a getter 'simpleName'.
NoSuchMethodError: method not found: 'simpleName'
Receiver: null
Arguments: []
Stack Trace:
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 isSimpleType (package:shelf_bind/src/util/mirror_util.dart:55:32)
My crude method is
bool isSimpleType(TypeMirror tm) =>
(tm.isTopLevel && tm.owner.simpleName == #dart.core);
The exception is
Unhandled exception:
Uncaught Error: The null object does not have a getter 'simpleName'.
NoSuchMethodError: method not found: 'simpleName'
Receiver: null
Arguments: []
Stack Trace:
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 isSimpleType (package:shelf_bind/src/util/mirror_util.dart:55:32)
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.