Open
Description
Dart SDK version: 3.1.0-246.0.dev (dev) (Fri Jun 23 01:04:39 2023 -0700) on "macos_arm64"
How to reproduce issue:
dart create foo
in foo/lib/foo.dart
:
library foo;
part '../bin/foo.dart';
int x = 3;
in foo/bin/foo.dart
:
part of '../lib/foo.dart';
void main(List<String> arguments) {
print(x);
}
remove the test
directory.
dart analyze
:
Analyzing foo... 0.5s
error • bin/foo.dart:4:9 • Undefined name 'x'. Try correcting the name to one that is defined, or defining the name. • undefined_identifier
error • lib/foo.dart:3:6 • Target of URI doesn't exist: 'package:foo/bin/foo.dart'. Try creating the file referenced by the URI, or try using a URI for a file that
does exist. • uri_does_not_exist
2 issues found.
dart run
:
Building package executable...
Built foo:foo.
3