recordUnprefixedImport method
void
recordUnprefixedImport(})
Records that the module this environment is the scope of imports
libraryUri without a prefix, bringing the declarations of surface —
the imported module's export environment — into scope unqualified,
filtered by the import's show / hide combinators.
SCD4 (scd4_aicv): this is what an ambiguity is judged against. A registry that holds every bridge the host registered — the AST runner's name baseline is one — marks a name ambiguous as soon as two libraries declare it, whether or not the reading script imports both. Dart decides ambiguity over the READER's imports, so lookup narrows the candidates to the packages these imports reach before it rejects the name.
Implementation
void recordUnprefixedImport(
String libraryUri,
Environment surface, {
Set<String>? show,
Set<String>? hide,
}) {
(_unprefixedImportsRaw ??= []).add(
_UnprefixedImport(libraryUri, surface, show, hide),
);
}