You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension method f will never be selected from typeNode
because Node already has a member with the same name and compatible parameter types.
deff:String="S"
Expectation
The warning is wrong, the method is in fact used, as evidenced by the output of the program, which is S, not F. Moreover, the method f of the type Node cannot be used, as it is hidden inside an opaque type.
The text was updated successfully, but these errors were encountered:
Thanks, I'll take a look. There have been a couple of tweaks for interactions with opaque types. (By interactions, I mean bugs. The warning must be useful in some way, per the original ticket, but I'll have to refresh my memory about how it is conditioned by opaque types. I remember I commented that the "real desired feature" is a use site warning, where I write x.m intending an extension method that is not selected because the X acquired a member.)
IIRC this is not a lint warning, but I tagged it as such.
Compiler version
3.7.0-RC1-bin-20250228-e592b37-NIGHTLY
Minimized code
Output
Expectation
The warning is wrong, the method is in fact used, as evidenced by the output of the program, which is S, not F. Moreover, the method
f
of the typeNode
cannot be used, as it is hidden inside anopaque type
.The text was updated successfully, but these errors were encountered: