You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inheriting from a generic class in a class that is otherwise not generic results in an internal error.
class Generic {
param x =1;
}
class Parent {
var x:borrowed Generic(?);
procinit(x:borrowed Generic(?)) {
this.x = x;
}
}
class Child: Parent(?) {
procinit(x:borrowed Generic(?)) {
super.init(x);
}
}
var g =new Generic();
var c =new Child(g);
This hits an internal error on new Child(g) in resolvePromotionType while trying to resolve type constructors. Making the Child class explicitly generic by adding param dummy = 1; to resolves the issue. Note that this bug occurs regardless of if Generic is generic-with-defaults or not.
The text was updated successfully, but these errors were encountered:
Adds `Python.checkExceptions` (on by default), which allows users to
turn off the exception checking to avoid overhead.
This PR also includes a few other cleanups and adds a future for
#26579
- [x] `start_test test/library/packages/Python`
- [x] `start_test test/library/packages/Python --compopts
-scheckExceptions=false`
- this has 1 expected failure of `argPassingTest`, which tests
exceptions
Future work:
- It would be nice to support this as a per-interpreter param as well,
but that opens us up to issues with generics and classes. So for now
thats a todo/nice-to-have
[Reviewed by @DanilaFe]
Inheriting from a generic class in a class that is otherwise not generic results in an internal error.
This hits an internal error on
new Child(g)
inresolvePromotionType
while trying to resolve type constructors. Making the Child class explicitly generic by addingparam dummy = 1;
to resolves the issue. Note that this bug occurs regardless of ifGeneric
is generic-with-defaults or not.The text was updated successfully, but these errors were encountered: