Open HosseinYousefi opened 3 hours ago
Summary: The issue reports that generic type inference fails when a type parameter T
extends a nullable type (Foo?
) in a static method. The code compiles when T
extends a non-nullable type (Foo
), but throws an error when T
extends a nullable type.
Related to https://github.com/dart-lang/sdk/issues/56998?
This works fine:
but if
T
extendsFoo?
instead, it doesn't:Is this expected behavior?