[Issue 18087] "no property 'value' for type 'void'" when properties split among mixins
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 5 17:39:14 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=18087
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nick at geany.org
--- Comment #2 from Nick Treleaven <nick at geany.org> ---
The error should be improved, but this should not compile. From the spec:
> If two different mixins are put in the same scope, and each define a declaration with the same name, there is an ambiguity error when the declaration is referenced
https://dlang.org/spec/template-mixin.html#mixin_scope
This is to prevent accidental collisions. Instead, you can do this inside class
Foo:
mixin tempy1 t1;
mixin tempy2 t2;
alias points = t1.points;
alias points = t2.points;
--
More information about the Digitalmars-d-bugs
mailing list