Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index 92ba4ff121e46e1e81cdc34a06de11ae15e468f9..913d91272a8b07c6fdfe0d226c3e99399f4dc2be 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -11865,7 +11865,7 @@ void Parser::ResolveType(ClassFinalizer::FinalizationKind finalization, |
const String& unresolved_class_name = |
String::Handle(Z, unresolved_class.ident()); |
Class& resolved_type_class = Class::Handle(Z); |
- if (unresolved_class.library_prefix() == LibraryPrefix::null()) { |
+ if (unresolved_class.library_or_library_prefix() == Object::null()) { |
// First check if the type is a function type parameter. |
if (!innermost_function().IsNull()) { |
// TODO(regis): Shortcut this lookup if no generic functions in scope. |
@@ -11915,9 +11915,11 @@ void Parser::ResolveType(ClassFinalizer::FinalizationKind finalization, |
} |
} else { |
// Resolve class name in the scope of the library prefix. |
- const LibraryPrefix& lib_prefix = |
- LibraryPrefix::Handle(Z, unresolved_class.library_prefix()); |
- resolved_type_class = lib_prefix.LookupClass(unresolved_class_name); |
+ const Object& prefix = |
+ Object::Handle(Z, unresolved_class.library_or_library_prefix()); |
+ ASSERT(prefix.IsLibraryPrefix()); |
+ resolved_type_class = |
+ LibraryPrefix::Cast(prefix).LookupClass(unresolved_class_name); |
} |
// At this point, we can only have a parameterized_type. |
const Type& parameterized_type = Type::Cast(*type); |
@@ -13452,8 +13454,8 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) { |
// into throwing a type error. |
const UnresolvedClass& cls = |
UnresolvedClass::Handle(Z, redirect_type.unresolved_class()); |
- const LibraryPrefix& prefix = |
- LibraryPrefix::Handle(Z, cls.library_prefix()); |
+ const LibraryPrefix& prefix = LibraryPrefix::Cast( |
+ Object::Handle(Z, cls.library_or_library_prefix())); |
if (!prefix.IsNull() && !prefix.is_loaded() && |
!FLAG_load_deferred_eagerly) { |
// If the redirection type is unresolved because it refers to |