feat: impl 关键字改为 extend

This commit is contained in:
2026-06-05 19:50:40 +08:00
parent 175f8a6658
commit 6fc599e6c2
8 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -335,7 +335,7 @@ void test_method_call_ok() {
Arena a = arena_create(1);
size_t tc; ErrorInfo lex_err = {0};
Token* toks = lex(&a,
"struct Point { x: i64, y: i64 } impl Point { fn get_x(self: Point) -> i64 { return self.x; } } fn main() -> i64 { let p: Point = Point { x: 42, y: 0 }; return p.get_x(); }",
"struct Point { x: i64, y: i64 } extend Point { fn get_x(self: Point) -> i64 { return self.x; } } fn main() -> i64 { let p: Point = Point { x: 42, y: 0 }; return p.get_x(); }",
"test", &tc, &lex_err);
ASSERT(toks != NULL);
ErrorInfo parse_err = {0};