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

[jvm] incorrect overload used when inline-function-call involved #9034

Closed
kevinresol opened this issue Dec 13, 2019 · 1 comment
Closed

[jvm] incorrect overload used when inline-function-call involved #9034

kevinresol opened this issue Dec 13, 2019 · 1 comment

Comments

@kevinresol
Copy link
Contributor

@kevinresol kevinresol commented Dec 13, 2019

class Main {
  static function main() {
    // ok
    // trace(java.nio.file.Paths.get('build.hxml', new java.NativeArray(0)));
    
    // fail: java.lang.ClassCastException: java.lang.String cannot be cast to java.net.URI
    bar(java.nio.file.Paths.get('build.hxml', new java.NativeArray(0)));
  }
  static public inline function bar(path:java.nio.file.Path):Void {
    trace(path);
  }
}

Removing inline fixes it

Paths.get has 2 overloads, listed here

@Simn

This comment has been minimized.

Copy link
Member

@Simn Simn commented Dec 13, 2019

Probably a variant of #7599

@Simn Simn closed this in 428b4d2 Dec 13, 2019
RealyUniqueName added a commit that referenced this issue Dec 13, 2019
closes #9034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.