-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Function pointer type inference #4310
Conversation
Done with review pass (commit 2) #Closed |
Done with review pass (commit 3) #Closed |
* Add exact inference section. * Correct the upper and lower bound qualifications. No implicit conversions are considered when doing inference, we simply add the correct bounds for the type (upper, lower, or exact).
@AlekseyTs I believe I've addressed the feedback. |
Done with review pass (commit 5) #Closed |
@AlekseyTs addressed feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 6)
This is not blocking, but I think we need to bring the proposal to LDM for an approval. |
I think we can do that over email, I'll send one. |
…pper or lower bound inferences.
@AlekseyTs made the change we discussed offline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 8)
The following case is added to bullet 3: | ||
|
||
> * `V` is a function pointer type `delegate*<V2..Vk, V1>` and there is a function pointer type `delegate*<U2..Uk, U1>` such that `U` is identical to | ||
`delegate*<U2..Uk, U1>`, and the calling convention of `V` is identical to `U`, and the refness of `Vi` is identical to `Ui`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "there is a function pointer type delegate*<U2..Uk, U1>
such that U
is identical to
delegate*<U2..Uk, U1>
", not just "U
is a function pointer type delegate*<U2..Uk, U1>
"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the calling convention of V
is identical to U
" is a bit imprecise. Either "V
and U
have identical calling conventions" or "the calling convention of V
is identical to the calling convention of U
"
The following case is added to bullet 3: | ||
|
||
> * `V` is a function pointer type `delegate*<V2..Vk, V1>` and there is a function pointer type `delegate*<U2..Uk, U1>` such that `U` is identical to | ||
`delegate*<U2..Uk, U1>`, and the calling convention of `V` is identical to `U`, and the refness of `Vi` is identical to `Ui`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the refness of Vi
is identical to Ui
" same comment plus make clear that it is each of the Vi
, e.g.: "the refness of each Vi
is identical to the refness of the corresponding Ui
" or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is refness a word? I believe we have another term for it, though I would have to dig to find it.
The following case is added to bullet 2: | ||
|
||
> * `U` is a function pointer type `delegate*<U2..Uk, U1>` and `V` is a function pointer type which is identical to `delegate*<V2..Vk, V1>`, and the | ||
calling convention of `U` is identical to `V`, and the refness of `Ui` is identical to `Vi`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as above, mutatis mutandum.
I've taken a stab at creating a spec for function pointer type inference, basing it off the rules for constructed and delegate type inference. I'm unsure that I actually got the wording right that reflects the actual rules I'm implementing in dotnet/roslyn#50249, so careful review is appreciated.