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

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

Issue 2668493002: Issue 28547. Fix for summarizing code with invalid type parameter reference. (Closed)
Patch Set: Handle invalid type parameter reference in expressions. Created 3 years, 11 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/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index f1d475bc5678945dce0b8f4374eef80f0f46f671..c091db90431358a7f0000aa160b4bdb0fd8b1ced 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -3118,6 +3118,15 @@ class B extends A {}
checkLibrary('export "a.dart"; export "b.dart";');
}
+ test_expr_invalid_typeParameter_asPrefix() {
+ variablesWithNotConstInitializers.add('f');
+ checkLibrary('''
+class C<T> {
+ final f = T.k;
+}
+''');
+ }
+
test_field_covariant() {
checkLibrary('''
class C {
@@ -4641,6 +4650,16 @@ bool f() => true;
checkLibrary('dynamic d;');
}
+ test_type_invalid_typeParameter_asPrefix() {
+ checkLibrary(
+ '''
+class C<T> {
+ m(T.K p) {}
+}
+''',
+ allowErrors: true);
+ }
+
test_type_reference_lib_to_lib() {
checkLibrary('class C {} enum E { v } typedef F(); C c; E e; F f;');
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698