Skip to content

Instantly share code, notes, and snippets.

@eernstg
Created April 30, 2025 17:21
Show Gist options
  • Save eernstg/5d8e1d8b3f4d331039ed02f1ff51e9be to your computer and use it in GitHub Desktop.
Save eernstg/5d8e1d8b3f4d331039ed02f1ff51e9be to your computer and use it in GitHub Desktop.
// This program printed `A<List<int>, dynamic>` before inference-using-bounds.
// With that feature it prints `A<List<int>, int>`.
class A<X extends Iterable<Y>, Y> {
final X x;
A(this.x) {
print('Creating an A<$X, $Y>.');
}
Y get first => x.first;
}
void main() {
var a = A([1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment