mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
Add object type, dot operator can return function references
This commit is contained in:
parent
69b9e17020
commit
47f95fc04a
18 changed files with 599 additions and 49 deletions
15
test/tests/object constructor.ans
Normal file
15
test/tests/object constructor.ans
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
% class
|
||||
:a:b = "foo"
|
||||
:c = "bar"
|
||||
|
||||
$ new(o::&class, x)
|
||||
~ o.c := x
|
||||
@o
|
||||
|
||||
:o = class
|
||||
:p = class!new("hoho")
|
||||
|
||||
{o}, {p}
|
||||
|
||||
{o.c} == {class.c}
|
||||
{p.c} != {class.c}
|
||||
Loading…
Add table
Add a link
Reference in a new issue