Improve: inferring the overall type from the method

This commit is contained in:
Shunsuke Shibayama 2022-09-30 01:22:22 +09:00
parent cd168ef131
commit 96c5527134
6 changed files with 58 additions and 5 deletions

View file

@ -10,6 +10,8 @@ Point3D|Point2D <: Norm|.
norm|T <: Norm| x: T = x.norm()
inplicit_norm x = x.norm()
p = Point2D.new {x = 3; y = 4}
print! norm(p)
assert norm(p) == 25