4eee6cb5ea
Three problems are fixed: - I forgot to pass the `downwards` flag when doing downwards inference. - I forgot to initialize the `formalTypes` and `actualTypes` arrays. - I wasn't tracking whether constructor type arguments were implicit or explicit, so constructor type inference wasn't actually happening. R=scheglov@google.com Review-Url: https://codereview.chromium.org/2864853002 .
18 lines
426 B
Dart
18 lines
426 B
Dart
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
/*@testedFeatures=inference*/
|
|
library test;
|
|
|
|
class A<T> {
|
|
A(B<List<T>> b);
|
|
}
|
|
|
|
class B<T> {}
|
|
|
|
main() {
|
|
var /*@type=A<dynamic>*/ x =
|
|
new /*@typeArgs=dynamic*/ A(new /*@typeArgs=List<dynamic>*/ B());
|
|
}
|