You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests with compile errors still run (then generate obscure corrupted error messages) #16496
Running "flutter packages get" in scratch...
compiler message: test/a_test.dart:4:11: Error: Constructor has no named parameter with the name 'bogus'.
compiler message: new Foo(bogus: 1);
compiler message: ^^^^^
compiler message: test/a_test.dart:1:13: Context: Found this candidate, but the arguments don't match.
compiler message: class Foo { Foo({ int arg }); }
compiler message: ^
00:00 +0 -1: loading /Users/ianh/dev/scratch/test/a_test.dart [E]
Failed to load "/Users/ianh/dev/scratch/test/a_test.dart":
No top-level method '' declared.
Receiver: top-level
Tried calling: (bogus: 1)
package:test serializeSuite
/var/folders/1b/7c22t3zx7h7_400fl83x5pxr000f_t/T/dart_test_listeneruFfxCR/listener.dart 18:27 main
00:00 +0 -1: Some tests failed.
If the test fails to compile, we should definitely not then run it. If we do run it, we should not have a bogus error message that refers to undeclared methods; instead we should get something more like what we used to get in Dart1:
Unhandled exception:
NoSuchMethodError: No constructor 'Foo' declared in class 'Foo'.
Receiver: Foo
Tried calling: new Foo(bogus: 1)
#0 NoSuchMethodError._throwNew (dart:core-patch/dart:core/errors_patch.dart:196)
#1 main (file:///Users/ianh/dev/scratch/test/a_test.dart:4:10)
#2 _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:279)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Fail test execution if compiler reported errors.
Fail test execution if compiler reported errors. (#16895)
Fail test execution if compiler reported errors. (flutter#16895)
github-actions commentedon Sep 3, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.