On this page:
.
.
8.12

6.46 Dot🔗ℹ

expression

target_expr . id

 

expression

target_expr . id assign_op expr

 

repetition

target_repet . id

 

assign_op

 = 

:=

 | 

other_assign_op

Accesses or updates a component of the value produce by target_expr, either statically or dynamically. The operation is static when target_expr is a dot provider. The access form also works as a repetition given a repetition for the target.

See also use_static.

> [1, 2, 3].length()

3

> class Posn(x, mutable y)

> def p = Posn(1, 2)

> p.x

1

> p.y := 20

> p

Posn(1, 20)