Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"is" fails for static, prefixed library method. #387

Closed
jtmcdole opened this issue Nov 8, 2011 · 2 comments
Closed

"is" fails for static, prefixed library method. #387

jtmcdole opened this issue Nov 8, 2011 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-invalid Closed as we don't believe the reported issue is generally actionable

Comments

@jtmcdole
Copy link
Contributor

jtmcdole commented Nov 8, 2011

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

@iposva-google
Copy link
Contributor

When filing bugs please attach or include the reduced testcase.

@jtmcdole
Copy link
Contributor Author

jtmcdole commented Nov 8, 2011

This is actually invalid. The type parameters were reversed in this case.


Added Invalid label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-invalid Closed as we don't believe the reported issue is generally actionable
Projects
None yet
Development

No branches or pull requests

2 participants