-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Add a helpful error message when trying to use a union of two eqsorts as a type.
This should error:
from typing import TypeAlias, Union
from egglog import *
class A(Expr):
def __init__(self) -> None: ...
class B(Expr):
def __init__(self) -> None: ...
CustomLike: TypeAlias = Union[A, B]
class C(Expr):
def __init__(self, some_input: CustomLike) -> None: ...
a = A()
b = B()
C(a) # ok
C(b) # not ok... :(larryshamalama
Metadata
Metadata
Assignees
Labels
No labels