dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.04k stars 1.55k forks source link

[analyzer] Wrong error in case of member conflict in augmenting library #55472

Open sgrekhov opened 4 months ago

sgrekhov commented 4 months ago

Test https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07.dart fails because of this issue. Error is reported on the last empty line of the _lib file

$ python3 tools/test.py -n analyzer-asserts-linux co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07
No build targets found.
Test configuration:
    analyzer-asserts-linux(architecture: x64, compiler: dart2analyzer, mode: release, runtime: none, system: linux, enable-asserts, use-sdk)
Suites tested: co19

FAILED: dart2analyzer-none release_x64 co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07
Expected: Pass
Actual: MissingCompileTimeError

--- Command "dart2analyzer" (took 02.000782s):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/dart-sdk/bin/dart out/ReleaseX64/gen/dartanalyzer.dart.snapshot -Dtest_runner.configuration=analyzer-asserts-linux --enable-experiment=macros --ignore-unrecognized-flags --packages=/home/sgrekhov/Google/dart-sdk/sdk/.dart_tool/package_config.json --format=json /home/sgrekhov/Google/dart-sdk/sdk/tests/co19/src/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07.dart

static error failures:
- Unexpected error at tests/co19/src/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07_lib.dart line 28, column 21, length 3: COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD

--- Re-run this test:
python3 tools/test.py -n analyzer-asserts-linux co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A06_t07
[00:03 | 100% | +    0 | -    1]

=== 0 tests passed, 1 failed ===
bwilkerson commented 4 months ago

@scheglov