| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 16455)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -7476,13 +7476,14 @@
|
| if (primary->primary().IsFunction()) {
|
| // Treat as implicit closure.
|
| left = LoadClosure(primary);
|
| - } else if (left->AsPrimaryNode()->primary().IsClass()) {
|
| - Class& cls = Class::CheckedHandle(
|
| - left->AsPrimaryNode()->primary().raw());
|
| - String& cls_name = String::Handle(cls.Name());
|
| - ErrorMsg(left->token_pos(),
|
| - "illegal use of class name '%s'",
|
| - cls_name.ToCString());
|
| + } else if (primary->primary().IsClass()) {
|
| + const Class& type_class = Class::Cast(primary->primary());
|
| + Type& type = Type::ZoneHandle(
|
| + Type::New(type_class, TypeArguments::Handle(),
|
| + primary->token_pos(), Heap::kOld));
|
| + type ^= ClassFinalizer::FinalizeType(
|
| + current_class(), type, ClassFinalizer::kCanonicalize);
|
| + left = new TypeNode(primary->token_pos(), type);
|
| } else if (primary->IsSuper()) {
|
| // Return "super" to handle unary super operator calls,
|
| // or to report illegal use of "super" otherwise.
|
|
|