- Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
classFoo: def__init__(self: "Foo", bar: i32): self.bar: i32=bardef__repr__(self: "Foo") ->str: returnstr(self.bar) defmain(): a: Foo=Foo(10) print(a) main()Works fine but if we make a Foo instance inplace in print
defmain(): print(Foo(10))this causes an infinite loop.
This also happens in case of functions taking in a Foo param
deffoobar(a: Foo): print(a)I imagine we need to add an error for as of now unsupported feature
PS: I had encountered a similar problem in my PR I simply threw an error for that case
Metadata
Metadata
Assignees
Labels
No labels