[feat]类初始化

This commit is contained in:
2025-12-22 17:38:52 +08:00
parent cff6bb77a3
commit 34a56beb90
13 changed files with 294 additions and 107 deletions

View File

@@ -1,9 +1,17 @@
var call := 0;
func t()
struct Person
{
call = call + 1;
__fstdout_println(call);
t();
name: String;
age: Int = 10;
public func getName()
{
return name;
}
}
t();
var person = Person{"123"};
const print := __fstdout_print;
print(person.name);
person.name = "sb";
print(person.name);