修复了函数调用时求值类型使用的作用域错误的问题。结构体中现在可以使用自己
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Official Module `std.tester`
|
||||
Library/std/tester/tester.fig
|
||||
Official Module `std.test`
|
||||
Library/std/test/test.fig
|
||||
|
||||
Copyright © 2025 PuqiAR. All rights reserved.
|
||||
*/
|
||||
@@ -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()};
|
||||
|
||||
Reference in New Issue
Block a user