Skip to content

#3847. Update constant type variable elimination tests#3943

Open
sgrekhov wants to merge 1 commit into
dart-lang:masterfrom
sgrekhov:co19-3847-16
Open

#3847. Update constant type variable elimination tests#3943
sgrekhov wants to merge 1 commit into
dart-lang:masterfrom
sgrekhov:co19-3847-16

Conversation

@sgrekhov

@sgrekhov sgrekhov commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@sgrekhov sgrekhov requested a review from eernstg July 7, 2026 09:48

@eernstg eernstg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! It does look like it would be possible to verify that the given list is actually a List<Never>.

void foo() {
const List<T> l1 = [];
const List<T> l1 = []; // `[]` has type List<Never> but it cannot be checked
l1.expectStaticType<Exactly<List<T>>>(); // l1 is still List<T>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would it not work to query it like l1 is List<Never>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants