blob: e625eaf2629471de239777ed48f904e1f33e2d85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# FIXME there is no check that a constructor initialises uninitialised
# fields such as this field.
T item!
constructor new_with_item!
T value
code
item = value
end
func set_item!
T value
code
# FIXME item can be assigned even though it is not changeable
item = value
end
func get_item
return
# FIXME it's inconvenient to have to give the return type a name
# and in particular in this case, where it can't be called "item"
T item_
code
return item
end
|