pub fn toIndex(inst: Ref) ?Index inst: Ref2371
2372
2373
2374
2375
2376
2377
2378
2379 pub fn toIndex(inst: Ref) ?Index {
assert(inst != .none);
const ref_int = @backingInt(inst);
if (ref_int >= static_len) {
return @fromBackingInt(@intCast(ref_int - static_len));
} else {
return null;
}
}