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

Abstract class name clash error #5815

Open
ibilon opened this issue Nov 11, 2016 · 2 comments
Open

Abstract class name clash error #5815

ibilon opened this issue Nov 11, 2016 · 2 comments
Assignees
Milestone

Comments

@ibilon
Copy link
Member

ibilon commented Nov 11, 2016

If you have in Test.hx

abstract Test(_Test) {
    public static var a = 2;
}
class _Test {}

You"ll get the error message:

Test.hx:1: lines 1-4 : This private class name will clash with _Test

which isn"t very explicit.

Also doesn"t happen if the abstract isn"t the main type of the module.

@Simn
Copy link
Member

Simn commented Nov 25, 2016

Looks fairly explicit to me, except that it says "class" instead of "type". What else would you want it to say?

@ibilon
Copy link
Member Author

ibilon commented Nov 25, 2016

The non explicit part is that the private _Test isn"t in the file but added by the compiler.
If possible it"d be best if the compiler could choose something free.
Otherwise the error message should say something about _Test being reserved.

@Simn Simn modified the milestone: 4.0 Jan 9, 2017
@Simn Simn removed this from the Release 4.0 milestone Apr 17, 2018
@Simn Simn self-assigned this Apr 18, 2018
@Simn Simn added this to the Design milestone Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants