Closed
Description
While having sucha a class with Generics is perfectly fine:
abstract class Response<TYPE extends Enum> {
TYPE get type;
}
the compiler does not allow for "catching" the argument. Neither this:
class Processor<R extends Response<TYPE>> {
TYPE handle(R response) => response.type;
}
nor this:
class Processor<R extends Response<TYPE extends Enum>> {
TYPE handle(R response) => response.type;
}
works.
In your issue, please include:
- Dart version and tooling diagnostic info (
dart info
) ->- Dart 3.0.0 (stable) (Thu May 4 01:11:00 2023 -0700) on "windows_x64"
- Whether you are using Windows, macOS, or Linux (if applicable) -> Windows 10
- Whether you are using Chrome, Safari, Firefox, Edge (if applicable) -> N/A
Metadata
Metadata
Assignees
Labels
No labels