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
The following breaks with a Exception 1 parameters expected, got 0:
@irdl_attr_definition
class Foo(ParametrizedAttribute):
name: str = "bar.foo"
param = ParameterDef(AnyAttr())
# Try to construct
Foo([*SomeAttr*])
Removing the type annotation for the name field fixes it:
@irdl_attr_definition
class Foo(ParametrizedAttribute):
name = "bar.foo"
param = ParameterDef(AnyAttr())
# Try to construct
Foo([*SomeAttr*])
I think we should change the API s.t. names are not defined as fields. That would make it less error-prone. Maybe have the name of the Attribute as part of the decorator? irdl_attr_definition("bar.foo")
The text was updated successfully, but these errors were encountered:
The following breaks with a
Exception 1 parameters expected, got 0
:Removing the type annotation for the name field fixes it:
I think we should change the API s.t. names are not defined as fields. That would make it less error-prone. Maybe have the name of the Attribute as part of the decorator?
irdl_attr_definition("bar.foo")
The text was updated successfully, but these errors were encountered: