-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Go: extract entities for type parameters #15216
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
base: main
Are you sure you want to change the base?
Go: extract entities for type parameters #15216
Conversation
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.
Low-confidence approval as I have only a hazy memory of what the type <-> object relation does.
b90a074
to
915a33a
Compare
Making this a draft as it needs some more work before it is reviewed again. The below test failures indicate that something is going wrong and we are extracting two different objects for the same type, which contradicts restrictions we put on that table. I need to think a bit more about type equality and whether we are doing the right thing and should lift the restrictions (my current hunch) or we are doing the wrong thing.
|
f0a3464
to
1180d8c
Compare
There is one less result because `T` occurs twice in the old results
This was overlooked previously. We already do this for named types. I have confirmed that none of the other cases in this switch statement are entities, that is they don't have a field of type `object` that can be accessed using `Obj()`.
1180d8c
to
b2560d0
Compare
This was overlooked previously. We already do this
for named types. I have confirmed that none of the
other cases in this switch statement are entities, that
is they don't have a field of type
object
that canbe accessed using
Obj()
.The test change will mean that for future Go version updates, changes in type parameters for library functions will not cause our test to fail.