We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Supports
This code:
from classes import AssociatedType, Supports, typeclass class A(AssociatedType): ... class B(AssociatedType): ... @typeclass(A) def one(instance) -> bool: ... @one.instance(int) def _one_int(instance: int) -> bool: ... @typeclass(B) def two(instance) -> bool: ... @two.instance(int) def _two_int(instance: int) -> bool: ... a: Supports[A] = 1 b: Supports[B] = 1
does not work:
ex.py:35: error: Incompatible types in assignment (expression has type "int", variable has type "Supports[B]")
This happens because of this line:
classes/classes/contrib/mypy/typeops/mro.py
Line 101 in d63f18b
We only add one Supports type to each instance.
This code:
does not work:
This happens because of this line:
classes/classes/contrib/mypy/typeops/mro.py
Line 101 in d63f18b
We only add one
Supportstype to each instance.