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

[java] @:overload on different types of functions should not be allowed #2689

Closed
singpolyma opened this issue Feb 28, 2014 · 2 comments · Fixed by #7594
Closed

[java] @:overload on different types of functions should not be allowed #2689

singpolyma opened this issue Feb 28, 2014 · 2 comments · Fixed by #7594
Assignees
Labels
platform-java Everything related to Java

Comments

@singpolyma
Copy link
Contributor

If I use @:overload to have multiple methods that take different types of functions, haxe allows it, but generates methods on the java side that all take arguments of the unparameterised type Function -- so javac complains.

@waneck
Copy link
Member

waneck commented Feb 28, 2014

@:overload's primary goal is to provide a consistent way to interact with pure Java/C# code. Using it for user code - like the case with Haxe functions is not portable between the other targets, and may cause conflicts like this one.
I'll leave this issue open since we could use an error on the haxe side, instead of failing on the Java compiler

@singpolyma
Copy link
Contributor Author

@waneck Yeah, an error on the haxe side is what I was thinking would be good.

@waneck waneck self-assigned this Mar 1, 2014
@ncannasse ncannasse added this to the 3.2 milestone Mar 4, 2014
@waneck waneck modified the milestones: Long term, 3.2 Sep 8, 2014
@Simn Simn removed this from the Long term milestone Apr 17, 2018
@Simn Simn added the platform-java Everything related to Java label Apr 19, 2018
@Simn Simn added this to the Bugs milestone Apr 19, 2018
Jakobeha added a commit to Jakobeha/haxe that referenced this issue Nov 4, 2018
Jakobeha added a commit to Jakobeha/haxe that referenced this issue Nov 5, 2018
@Jakobeha Jakobeha mentioned this issue Nov 5, 2018
RealyUniqueName pushed a commit that referenced this issue Aug 22, 2019
* [#2689] overload not allowed for java

* fixed overloading, more specific message

* made .gitignore ignore local history

* improve error messages; optimize traversing overloads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-java Everything related to Java
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants