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
Hi,
I've faced the following misunderstanding. The ref/spec says that:
Given a struct type S and a type named T, promoted methods are included in the method set of the struct as follows:
If S contains an anonymous field T, the method sets of S and *S both include promoted methods with receiver T. The method set of *S also includes promoted methods with receiver *T.
So I expect to get an error accessing promoted method of S with anonymouse field T with the receiver *T: see playground
But it compiles well and gives the correct answer instead of an error.
The text was updated successfully, but these errors were encountered:
Hi,
I've faced the following misunderstanding. The ref/spec says that:
So I expect to get an error accessing promoted method of S with anonymouse field T with the receiver *T: see playground
But it compiles well and gives the correct answer instead of an error.
The text was updated successfully, but these errors were encountered: