mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:21:07 +00:00
Fix for resynthesizing invalid elements as type arguments of declared types.
Reproduced using Brian's stress test. R=paulberry@google.com BUG= Review-Url: https://codereview.chromium.org/2662983005 .
This commit is contained in:
parent
bcfa7e9ad2
commit
54c8496a38
|
@ -1625,7 +1625,8 @@ class _UnitResynthesizer {
|
|||
} else {
|
||||
DartType getTypeArgument(int i) {
|
||||
if (i < type.typeArguments.length) {
|
||||
return buildType(type.typeArguments[i], typeParameterContext);
|
||||
return buildType(type.typeArguments[i], typeParameterContext,
|
||||
declaredType: declaredType);
|
||||
} else {
|
||||
return DynamicTypeImpl.instance;
|
||||
}
|
||||
|
|
|
@ -4679,6 +4679,15 @@ int V = 0;
|
|||
allowErrors: true);
|
||||
}
|
||||
|
||||
test_type_invalid_topLevelVariableElement_asTypeArgument() {
|
||||
checkLibrary(
|
||||
'''
|
||||
var V;
|
||||
static List<V> V2;
|
||||
''',
|
||||
allowErrors: true);
|
||||
}
|
||||
|
||||
test_type_invalid_typeParameter_asPrefix() {
|
||||
checkLibrary(
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue