Analyzer does not throw a compile error for the type which is not well bounded. #47276
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Dart SDK version: 2.15.0-116.0.dev (dev) (Thu Sep 16 09:47:01 2021 -0700) on "windows_x64"
Analyzer does not throw a compile error for the types which are not well-bounded.
For example, dart throws a compile error whereas analyzer passes without any error or warning with the following source code example:
Seems like this is a bug in analyzer because G is not a well-bounded type so a error should be thrown here.
See also Issue #44786 evaluation: runtime behavior is correct, so I suppose #44786 should be closed a fixed.
Dart sample output is:
The text was updated successfully, but these errors were encountered: