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

Unified Diff: pkg/compiler/lib/src/kernel/world_builder.dart

Issue 2685673004: Handle Creates and Returns annotations in KernelBehaviorBuilder (Closed)
Patch Set: 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
Index: pkg/compiler/lib/src/kernel/world_builder.dart
diff --git a/pkg/compiler/lib/src/kernel/world_builder.dart b/pkg/compiler/lib/src/kernel/world_builder.dart
index 7f1f2ab749a0cbd2f6e60651ba394cb750fe0130..75c78c4598c0449e58974a8baf9e65906bcf1550 100644
--- a/pkg/compiler/lib/src/kernel/world_builder.dart
+++ b/pkg/compiler/lib/src/kernel/world_builder.dart
@@ -107,7 +107,10 @@ class KernelWorldBuilder extends KernelElementAdapterMixin {
ClassEntity lookupClass(KLibrary library, String name) {
KLibraryEnv libraryEnv = _libraryEnvs[library.libraryIndex];
KClassEnv classEnv = libraryEnv.lookupClass(name);
- return _getClass(classEnv.cls, classEnv);
+ if (classEnv != null) {
+ return _getClass(classEnv.cls, classEnv);
+ }
+ return null;
}
MemberEntity lookupClassMember(KClass cls, String name,

Powered by Google App Engine
This is Rietveld 408576698