-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Description
For this example:
class A {
dynamic foo(a) {
baz() {
print('a $a');
}
return baz;
}
}
main() {
dynamic x = A().foo(1);
x<List>();
}Default:
% rm -rf out/ReleaseX64
% tools/build.py -ax64 -mrelease runtime_kernel
% out/ReleaseX64/dart test.dart
Unhandled exception:
NoSuchMethodError: Closure call with mismatched arguments: function 'A.foo.baz'
Receiver: Closure: () => Null
Tried calling: A.foo.baz<List<dynamic>>()
Found: A.foo.baz() => Null
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 main (../test.dart:12:4)
#2 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
Bytecode:
% rm -rf out/ReleaseX64
% tools/gn.py -mrelease --bytecode -ax64
% tools/build.py -ax64 -mrelease runtime_kernel
% out/ReleaseX64/dart test.dart
a 1
^^^ This should have thrown an exception instead.
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.