Skip to content

[cfe] Missing check that type alias in instance creation is regular-bounded #45670

@eernstg

Description

@eernstg

Consider the following program:

import 'dart:async';

class C<X> {}
typedef A<X extends FutureOr<C<X?>>> = C<X>;
void main() => A();

The front end (dart from 04e7766) accepts the above program with no errors. However, A is inferred as A<FutureOr<C<Object?>>> which is a super-bounded type, so A() should be flagged as an error.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions