Skip to content

Analyzer doesn't error on legacy libraries #50694

@mit-mit

Description

@mit-mit

Repro steps with current main:

$ dart create testapp
$ cd testapp
$ nano lib/testapp.dart

Add // @dart=2.9 in that file

$ dart analyze .
Analyzing ....                         1.2s

   info • bin/app2.dart:1:8 • The library 'package:app2/app2.dart' is legacy, and shouldn't be imported into a null safe library. Try
          migrating the imported library. • import_of_legacy_library_into_null_safe
   info • test/app2_test.dart:1:8 • The library 'package:app2/app2.dart' is legacy, and shouldn't be imported into a null safe
          library. Try migrating the imported library. • import_of_legacy_library_into_null_safe

2 issues found.

Expected result: an error
Actual result: two infos

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions