mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
Enhance: empty classes can be generated by Class()
This commit is contained in:
parent
5b0dedd421
commit
d8f7e386c8
12 changed files with 127 additions and 78 deletions
|
@ -1,3 +1,7 @@
|
|||
Empty = Class()
|
||||
empty = Empty.new()
|
||||
print! empty
|
||||
|
||||
# Inheritance is prohibited by default. Remove this decorator and check for errors.
|
||||
@Inheritable
|
||||
Point2D = Class {x = Int; y = Int}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue