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

Unable to import as when importing lime.app.Event #1824

Open
NeeEoo opened this issue Aug 1, 2024 · 4 comments
Open

Unable to import as when importing lime.app.Event #1824

NeeEoo opened this issue Aug 1, 2024 · 4 comments

Comments

@NeeEoo
Copy link

NeeEoo commented Aug 1, 2024

I noticed when i tried importing lime.app.Event as a different name it wouldn't let me.

Skärmavbild 2024-08-01 kl  17 54 50
@joshtynjala
Copy link
Member

lime.app.Event is defined with one parameter as class Event<T>. It appears that the Haxe compiler wants you to add the parameter.

@NeeEoo
Copy link
Author

NeeEoo commented Aug 1, 2024

Whats weird is that it works with other generic classes, but not with lime.app.Event
see https://try.haxe.org/#Ae2b484D

@NeeEoo
Copy link
Author

NeeEoo commented Aug 1, 2024

Skärmavbild 2024-08-01 kl  18 16 25

and it doesnt work when adding it, since the haxe compiler only checks for identifiers during the import statement

@joshtynjala
Copy link
Member

Hmm... the error seems to come from EventMacro.

https://github.com/openfl/lime/blob/8.1.3/src/lime/_internal/macros/EventMacro.hx#L24

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