修复了函数调用时求值类型使用的作用域错误的问题。结构体中现在可以使用自己

This commit is contained in:
2026-02-03 18:49:40 +08:00
parent 01c16dee3f
commit 4535f75058
9 changed files with 169 additions and 49 deletions

View File

@@ -43,8 +43,19 @@ public struct Time
return result;
}
// TODO: support `-` operator when Fig supports overload
// supported now! 26-2-2. PuqiAR
}
impl Operation for Time
{
Sub(l: Time, r: Time)
{
return new Time{
l.since(r)
};
}
}
public func now() -> Time
{
return new Time{__ftime_now_ns()};