Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 1841603003: Serialize references to type parameters in final fields. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index ec24bd4dde83d1c30a03c1f227c299f64b5596a6..060e5c5cf1b8b5b0e18e1881bdb58ddd41c25f4b 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -5741,6 +5741,18 @@ class C {
_assertUnlinkedConst(variable.constExpr, isInvalid: true);
}
+ test_field_final_typeParameter() {
+ UnlinkedVariable variable = serializeClassText(r'''
+class C<T> {
+ final f = <T>[];
+}''').fields[0];
+ expect(variable.isFinal, isTrue);
+ _assertUnlinkedConst(variable.constExpr,
+ operators: [UnlinkedConstOperation.makeTypedList],
+ ints: [0],
+ referenceValidators: [(EntityRef r) => checkParamTypeRef(r, 1)]);
+ }
+
test_field_formal_param_inferred_type_explicit() {
UnlinkedClass cls = serializeClassText(
'class C extends D { var v; C(int this.v); }'
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698