Skip to content

Meta issue for implementation of strong mode instantiate to bound for Dart 1.5 #27526

@leafpetersen

Description

@leafpetersen

Meta issue tracking the final implementation of the instantiate to bound behavior for Dart 1.5 (that is, how to treat uses of generic types/methods where no type arguments are specified).

A bit more context (but see the relevant discussion in #26265):
Dart tries to infer the type of generic arguments based on the given bounds. However, that can be complicated (and sometimes impossible). For example the following example should probably be an error:

class A<G extends B> {}
class B<H extends A> {}
A x = null;  // What should the generic type of A be?

Different approaches possible. One restriction (for example) would require to write the generic type in the bound:

class A<G extends B<must_write_something_here>> {}
class B<H extends A<must_write_something_here>> {}

Tracking bugs:

In a following release:

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).area-metaCross-cutting, high-level issues (for tracking many other implementation issues, ...).

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions