1
0
Fork 0
forked from fun/fun

Added line numbers to debug and error output.

This commit is contained in:
Johannes Findeisen 2025-09-16 11:23:42 +02:00
commit 6b14c2776e
6 changed files with 52 additions and 3 deletions

View file

@ -12,9 +12,9 @@
// Objects as maps: nested fields, methods with explicit self
// A method to move a 2D point by dx, dy
fun move(self, dx, dy)
self["x"] = self["x"] + dx
self["y"] = self["y"] + dy
fun move(p, x, y)
p["x"] = p["x"] + x
p["y"] = p["y"] + y
return 0
// Create a point directly and inspect fields