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

Can mixin handle duplicated extending correctly? #14

Open
LongTengDao opened this issue Sep 18, 2022 · 1 comment
Open

Can mixin handle duplicated extending correctly? #14

LongTengDao opened this issue Sep 18, 2022 · 1 comment

Comments

@LongTengDao
Copy link

mixin X {}
mixin Y extends X {}
mixin Z extends X {}
class A with X, X, Y, Z {}

It could actually happen for multi using of different libs, they could have shared mixin, but only meant including that, not run twice or more times...

@Atry
Copy link

Atry commented Jan 15, 2023

Because mixins are just functions, the function implementation could decide if it should or not skip the transformation when it detected the mixin had been applied.

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