Based on "that's not in the spec", we'd need to remove override inference from `enum` and `mixin` declarations as well. Perhaps the motivation could be "this is not in the spec _and_ it is more controversial than other cases _and_ it hasn't been supported in a stable version".
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Based on "that's not in the spec", we'd need to remove override inference from `enum` and `mixin` declarations as well. Perhaps the motivation could be "this is not in the spec _and_ it is more controversial than other cases _and_ it hasn't been supported in a stable version".
Let me rephrase it as "not in the spec *and* wasn't expected or intended to be part of the extension type feature".
It's not controversial. There is no feature. There is no specification for it, it _doesn't_ generalize cleanly from existing specified features, it wasn't implemented by any tool when extension types were released, and nobody was surprised by that.
Override inference _was_ intended to work for declarations that overrides other declaration signatures. Whether those are declared in a class, mixin or enum declaration, they all use the same override rules. I don't have surviving design documents for override inference, I believe it was part of Dart 2.0, and I'll admit the testing is ... sparse for anything but `class` declarations.
Every implementation has supported override inference since the start, and nobody was surprised by that.
Extension members don't override anything, and there was never any sign that override inference was intended to apply. The [extension type specification](https://github.com/dart-lang/language/blob/main/accepted/3.3/extension-types/feature-specification.md) doesn't mention it. All uses of the word "override" is either in scare-quotes or used as part of a phrase like "no override relation". There is no occurrence of the word "inference".
But the most signficant signal is that it was never implemented, and nobody thought that it should be.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
extension type E(A _) {We should validate that override inference is not performed for the representation variable as well.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |