Open
Description
Example:
void main() {
const c1 = identical(C<int>.new, C<int>.new) ? 0 : (1 ~/ 0);
const c2 = identical(C<ExInt>.new, C<ExInt>.new) ? 0 : (1 ~/ 0);
const c3 = identical(C<ExInt>.new, C<int>.new) ? 0 : (1 ~/ 0); /// Fails in analyzer
const c4 = identical(C<ExInt>, C<int>) ? 0 : (1 ~/ 0);
}
extension type const ExInt(int _) implements int {}
class C<T> {
C();
}
The analyzer considers the constants C<ExInt>.new
and C<int>.new
different. The values of those should be the same (as C<int>.new
), because the values only use extension-type-erased types. The static type is different, but identical
shouldn't care.
CFE has no issue.
Metadata
Metadata
Assignees
Labels
A lower priority bug or feature requestFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.Issues with the analyzer's implementation of the language specImplementation of the extension type featureIncorrect behavior (everything from a crash to more subtle misbehavior)