regression involving subclass and overloaded constructor #3927
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Describe the bug
Following code reports error. If we move the
method
to the parent class the error disappears. If we explicitly annotate theinner()
with-> Iterable[ContainerSub[T_co]]
instead of agenerator
the error also disappears. Replacing the__init__
's arg withUnion
instead of overloading can also avoid the error.To Reproduce
Steps to reproduce the behavior.
Expected behavior
Code used to type check before 1.1.262
Screenshots or Code
VS Code extension or command-line
pyright 1.1.270
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: