Dart does not throw compile time error if bounds do not match for type argument of typedef function #36960
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
front-end-missing-error
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Dart SDK Version: 2.3.1-dev.0.0
OS: Windows 10 64 bit
The following code sample declares a typedef with type argument which does not match the bounds because [String] does not extend [num]:
Analyzer expectedly throws a compile time error here whereas dart runs without any errors or warnings.
I believe dart should throw a error here too.
Sample output is:
The text was updated successfully, but these errors were encountered: