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

Unified Diff: pkg/kernel/test/type_parser.dart

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments Created 3 years, 10 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/kernel/test/self_check_util.dart ('k') | pkg/kernel/test/verify_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/test/type_parser.dart
diff --git a/pkg/kernel/test/type_parser.dart b/pkg/kernel/test/type_parser.dart
index d2e1b4dd9841d065d05a28291324ed1b6ffba33f..38209b4365e25bf3490f3d402d425246c48ac7f9 100644
--- a/pkg/kernel/test/type_parser.dart
+++ b/pkg/kernel/test/type_parser.dart
@@ -274,8 +274,14 @@ class DartTypeParser {
class LazyTypeEnvironment {
final Map<String, Class> classes = <String, Class>{};
final Map<String, TypeParameter> typeParameters = <String, TypeParameter>{};
- final Library dummyLibrary =
- new Library(new Uri(path: 'dummy.dart'), name: 'lib');
+ Library dummyLibrary;
+ final Program program = new Program();
+
+ LazyTypeEnvironment() {
+ dummyLibrary = new Library(Uri.parse('file://dummy.dart'));
+ program.libraries.add(dummyLibrary..parent = program);
+ dummyLibrary.name = 'lib';
+ }
TreeNode lookup(String name) {
return name.length == 1
« no previous file with comments | « pkg/kernel/test/self_check_util.dart ('k') | pkg/kernel/test/verify_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698