fieldAccess
Function parameters
Parameters
- gz:*GenZir
- scope:*Scope
- node:Ast.Node.Index
Functions in this namespace
Functions
Source
Implementation
fn fieldAccess(
gz: *GenZir,
scope: *Scope,
ri: ResultInfo,
node: Ast.Node.Index,
) InnerError!Zir.Inst.Ref {
switch (ri.rl) {
.ref, .ref_coerced_ty => return addFieldAccess(.field_ptr, gz, scope, .{ .rl = .ref }, node),
else => {
const access = try addFieldAccess(.field_val, gz, scope, .{ .rl = .none }, node);
return rvalue(gz, ri, access, node);
},
}
}