"is" fails for static, prefixed library method. #387
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
closed-invalid
Closed as we don't believe the reported issue is generally actionable
Code that fails:
var z = prefix.B.staticGetKeys;
Expect.isTrue(z is prefix.ReturnCollection<String>);
Expect.isTrue(z is !prefix.ReturnCollection<int>);
Expect.isTrue(z is GetKeysFunctionType<String>);
Expect.isTrue(z is !GetKeysFunctionType<int>);
Application includes / typedefs that mater:
import("MethodOverrideTest_lib.dart", prefix : "prefix");
typedef Collection<K> GetKeysFunctionType<K>();
The other library has:
typedef ReturnDynamic<K>();
class B {
static Collection<int> staticGetKeys() {
return new Collection<int>();
}
}
Output:
An unhandled exception has been thrown
Expect.isTrue(false) fails.
0. Function: 'Expect._fail@127eafe4' url: 'bootstrap' line:819 col:5
1. Function: 'Expect.isTrue' url: 'bootstrap' line:593 col:10
2. Function: 'main' url: '/usr/local/google/users/codefu/src/dart/tmp/MethodOverrideTest.dart' line:67 col:16
The text was updated successfully, but these errors were encountered: