Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Enum type inference doesn't work in mixin call

Open disarray2077 opened this issue 4 years ago • 2 comments

Enum type inference doesn't work with enums in a mixin parameter, even if the type is specified. Example:

mixin myMixin(StringSplitOptions value)
{
}
myMixin!(.None); // Error
myMixin!(StringSplitOptions.None); // Ok

disarray2077 avatar Jun 19 '21 15:06 disarray2077

Just want to bump this to say this bug is still present as of the latest nightly build. Attempting to use enum type inference for a mixin argument results in this compile error:

ERROR: Unqualified dot syntax can only be used when the result type can be inferred at line ...

Moneyl avatar Sep 04 '22 22:09 Moneyl