opshin
opshin copied to clipboard
isinstance checks in list filter expressions don't perform a type cast
Describe the bug
when writing [x for x in xs if isinstance(x, Y)]
, the type of x
is not correctly cast to Y
as one might expect.
To Reproduce Testcases added in dd526c0f7c9b71f234cc33f9db7b26f0ea4794a3
Expected behavior
x
should have type Y
in this expression