-
Notifications
You must be signed in to change notification settings - Fork 421
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
[Bug]: implicit this does not work in some secondary methods #26083
Comments
The When PR #5057 added support for methods on instantiated types with parentheses (as you use above), it didn't handle the implicit The AFAIK the Dyno resolver will address both of these when it comes online. So it'd be good to have .futures. Along those lines, I know of these futures:
|
Ok, with that in mind I have opened #26084 to add futures for this case so that these cases don't get forgotten as Dyno comes online. I expanded |
See also issue #5979 which describes some of the cases here (and this issue is arguably a duplicate of that one, but IMO we should keep both because they emphasize different things). |
The language spec states that identifiers can be used in a method without an explicit
this.
and still resolve. This is offered without qualification in the spec, and an example is shown with secondary methods. However I have found that secondary methods with more complicated receivers fail to resolve.The following code shows an example of this. In
foo
, implicit this works properly. However bothbar
andbaz
fail to compile sincex
/t
is not considered in scope. Note that in all cases, adding an explicitthis.
causes all functions to resolve properly.I think that in all three functions implicit this should work, and
x
/t
should resolve tothis.x
/this.t
.The text was updated successfully, but these errors were encountered: