mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
Update class.er
This commit is contained in:
parent
533fddcba5
commit
a6876f10d0
1 changed files with 0 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
|||
@Inheritable
|
||||
Point2D = Class {x = Int; y = Int}
|
||||
Point2D.
|
||||
new x, y = Point2D::__new__ {x; y}
|
||||
norm ref self = self::x**2 + self::y**2
|
||||
|
||||
Point3D = Inherit Point2D, Additional := {z = Int}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue