Skip to content

Equality of generic constructor tearoffs instantiated with a type variable #1777

Closed
@nshahan

Description

@nshahan

The test for constructor tear offs has a section at the end for generic instantiation with a type variable that expects the tearoffs be not equal.

https://github.com/dart-lang/sdk/blob/5208456b5af83120d0cb21c6a2a4d2f07e9c89e6/tests/language/constructor/tear_off_test.dart#L202-L209

This expectation feels at counter to the proposed equality for generic static methods in a similar setting as seen towards the end of this pending change.
https://dart-review.googlesource.com/c/sdk/+/205081/5/tests/language/closure/identity_equality_tearoff_test.dart#359

This is especially a problem since the implemented lowering allows access to the constructor tearoff through a generic static method which makes it difficult to prevent them from being equal just in the case of constructors.

@eernstg Do you expect the constructor tearoff test/spec will get updated to match the proposed spec for the tearoff equality of generic static methods?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions