Skip to content

Fix an enum-related assert in canonicalization #2812

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

Merged
merged 5 commits into from
Sep 27, 2021

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented Sep 27, 2021

Enums can implement types, and that matters now.

The possibility for this problem was introduced with https://dart-review.googlesource.com/c/sdk/+/203564, but it didn't actually become a problem until a field _name was added to the Enum class, here: https://dart-review.googlesource.com/c/sdk/+/210480. This tripped an assert in canonicalization because this seemed to be inherited but we didn't have Enum in our inheritance chain.

Fix that by adding type implementation support to the Enum type and verifying that Enum gets dropped into the superchain for enums.

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Sep 27, 2021
@jcollins-g jcollins-g merged commit a3ca4cf into dart-lang:master Sep 27, 2021
@jcollins-g jcollins-g deleted the fix-assert-enum branch September 27, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants