aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/this.zig9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/behavior/this.zig b/test/behavior/this.zig
index 086fe2814a..0fcfd5910c 100644
--- a/test/behavior/this.zig
+++ b/test/behavior/this.zig
@@ -24,11 +24,10 @@ test "this refer to module call private fn" {
}
test "this refer to container" {
- var pt = Point(i32){
- .x = 12,
- .y = 34,
- };
- pt.addOne();
+ var pt: Point(i32) = undefined;
+ pt.x = 12;
+ pt.y = 34;
+ Point(i32).addOne(&pt);
try expect(pt.x == 13);
try expect(pt.y == 35);
}