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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_test.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, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/constant/value.dart'; 10 import 'package:analyzer/dart/constant/value.dart';
(...skipping 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 typedef F(int a, String b); 2165 typedef F(int a, String b);
2166 '''); 2166 ''');
2167 checkLibrary(r''' 2167 checkLibrary(r'''
2168 import 'a.dart' as p; 2168 import 'a.dart' as p;
2169 const vClass = p.C; 2169 const vClass = p.C;
2170 const vEnum = p.E; 2170 const vEnum = p.E;
2171 const vFunctionTypeAlias = p.F; 2171 const vFunctionTypeAlias = p.F;
2172 '''); 2172 ''');
2173 } 2173 }
2174 2174
2175 test_const_reference_type_typeParameter() {
2176 checkLibrary(r'''
2177 class C<T> {
2178 final f = <T>[];
2179 }
2180 ''');
2181 }
2182
2175 test_const_reference_unresolved_prefix0() { 2183 test_const_reference_unresolved_prefix0() {
2176 checkLibrary( 2184 checkLibrary(
2177 r''' 2185 r'''
2178 const V = foo; 2186 const V = foo;
2179 ''', 2187 ''',
2180 allowErrors: true); 2188 allowErrors: true);
2181 } 2189 }
2182 2190
2183 test_const_reference_unresolved_prefix1() { 2191 test_const_reference_unresolved_prefix1() {
2184 checkLibrary( 2192 checkLibrary(
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
4220 fail('Unexpectedly tried to get unlinked summary for $uri'); 4228 fail('Unexpectedly tried to get unlinked summary for $uri');
4221 } 4229 }
4222 return serializedUnit; 4230 return serializedUnit;
4223 } 4231 }
4224 4232
4225 @override 4233 @override
4226 bool hasLibrarySummary(String uri) { 4234 bool hasLibrarySummary(String uri) {
4227 return true; 4235 return true;
4228 } 4236 }
4229 } 4237 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.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