Access a field of a Struct
To access members of a struct like a.x, we trigger two ref operations. The first ref operation looks up a to figure out what type it is. The second ref then resolves x within a’s scope (upon seeing the . node). We match (possibly nested) member access expressions, e.g.:
"a", "a.b", "a.b.c", and so on
Given «expr».x, member need’s «expr»’s type because it must look up x with the scope of «expr».
- Companion:
- object
trait Serializable
trait Product
trait Equals
class LValue
class Expr
trait HasStaticTypeSafety
trait HasPromoteToType
trait HasEvalType
class Stat
class AST
class Object
trait Matchable
class Any