| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index 1cf58b5c06d6e8770b20f32a3c176756405d7741..822bf26c5272ffe09b6541e3c18d9eaad296f313 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -4925,7 +4925,7 @@ void Parser::ParseIdentList(GrowableObjectArray* names) {
|
| }
|
|
|
|
|
| -void Parser::ParseLibraryImportExport() {
|
| +void Parser::ParseLibraryImportExport(intptr_t metadata_pos) {
|
| bool is_import = (CurrentToken() == Token::kIMPORT);
|
| bool is_export = (CurrentToken() == Token::kEXPORT);
|
| ASSERT(is_import || is_export);
|
| @@ -4988,8 +4988,13 @@ void Parser::ParseLibraryImportExport() {
|
| library.Register();
|
| }
|
| }
|
| - const Namespace& ns =
|
| - Namespace::Handle(Namespace::New(library, show_names, hide_names));
|
| +
|
| + Namespace& ns =
|
| + Namespace::Handle(Namespace::New(library, show_names, hide_names));
|
| + if (metadata_pos >= 0) {
|
| + ns.AddMetadata(metadata_pos, current_class());
|
| + }
|
| +
|
| if (is_import) {
|
| // Ensure that private dart:_ libraries are only imported into dart:
|
| // libraries.
|
| @@ -5062,7 +5067,7 @@ void Parser::ParseLibraryDefinition() {
|
| }
|
| while ((CurrentToken() == Token::kIMPORT) ||
|
| (CurrentToken() == Token::kEXPORT)) {
|
| - ParseLibraryImportExport();
|
| + ParseLibraryImportExport(metadata_pos);
|
| rewind_pos = TokenPos();
|
| metadata_pos = SkipMetadata();
|
| }
|
|
|