forked from PuqiAR/Fig-TreeWalker
修复了函数调用时求值类型使用的作用域错误的问题。结构体中现在可以使用自己
This commit is contained in:
@@ -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