-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compilertopic:compiler:generics
Description
Right now inheriting from generic types, and even inheriting a non-generic type that's not Reference
is broken. There are many issues related to this, which I'll link here:
- Compiler problem in 0.16.0 with generics #2558 bug with generics inheritance
- class method returns one value, but is_a?(<this value>) contradicts. Can't debug #2376 mentions generics, the bug might be related to that
- Return type as generic base class is not allowed #2283 Return type as generic base class is not allowed
- How does
macro inherited
work with generics? #1793 How does macroinherited
work with generics - Bug with macro def and generic class inheriting non-generic class #846 Bug with macro def and generic class inheriting non-generic class
- Typing an instance variable as a generic module with specific type #2459 Can't type an instance variable as a generic module type
- Recursive alias does not match non generic subclass of generic type #1473 Recursive alias does not match non generic subclass of generic type
- Variance with generic parent class #1943 Variance with generic parent class
- Inheriting from generic class/struct ignoring the type causes segmentation fault #1944 Inheriting from generic class/struct ignoring the type causes segmentation fault
- Compiler error when subclassing HTTP::Handler with a generic class #2051 Compiler error when subclassing HTTP::Handler with a generic class
And one pending decision:
- Covariance and contravariance in generic types #1297 Covariance and contravariance in generic types
All of these should be fixed. The main issue is that the current implementation is very weak and needs a redesign. This is only a matter of time.
This issue will be used to mark all bugs related to generics as a duplicate of this one, because it's essentially one problem.
FeldrinH
Metadata
Metadata
Assignees
Labels
kind:bugA bug in the code. Does not apply to documentation, specs, etc.A bug in the code. Does not apply to documentation, specs, etc.topic:compilertopic:compiler:generics