Skip to content

CFE: Remove error for library name clash #42700

@eernstg

Description

@eernstg

The CFE reports a warning in the following situation:

// Library 'lib1.dart'.
library clashing.nonempty.name;

// Library 'lib2.dart'.
library clashing.nonempty.name;

// Library 'main.dart'.
import 'lib1.dart';
import 'lib2.dart';

void main() {}

The response with dart from commit a48bebe is as follows:

tests/language_2/import/name_clash_test.dart:7:1: Warning: A library with name 'clashing.nonempty.name' is imported more than once.
import "name_clash_lib1.dart";
^
tests/language_2/import/name_clash_test.dart:8:1: Context: 'clashing.nonempty.name' is also imported here.
import "name_clash_lib2.dart";
^

This warning was removed from the language specification in dart-lang/language#1083, so the CFE should no more report this warning, with or without null-safety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions