Implement Phase 6 Box reference operations in MIR/VM - RefNew/RefGet/RefSet/WeakNew/WeakLoad/Barrier*
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
23
test_field_access.nyash
Normal file
23
test_field_access.nyash
Normal file
@ -0,0 +1,23 @@
|
||||
// Test for Phase 6 Box reference operations
|
||||
// Simple field access test
|
||||
|
||||
static box Main {
|
||||
init { console }
|
||||
|
||||
main() {
|
||||
me.console = new ConsoleBox()
|
||||
me.console.log("Testing Phase 6 Box reference operations")
|
||||
|
||||
// Create a simple object
|
||||
local obj
|
||||
obj = new StringBox("Hello")
|
||||
|
||||
// Test field access
|
||||
local result
|
||||
result = obj.length
|
||||
|
||||
print("Field access result: " + result)
|
||||
|
||||
return "Phase 6 test completed"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user