mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: allow using of original operation if alias is number and no custom method is defined (#17718)
This commit is contained in:
@@ -286,3 +286,9 @@ fn test_add_seconds_to_time() {
|
||||
future_tm := now_tm.add_seconds(60)
|
||||
assert now_tm.unix < future_tm.unix
|
||||
}
|
||||
|
||||
fn test_plus_equals_duration() {
|
||||
mut d := time.second
|
||||
d += time.second
|
||||
assert d == 2 * time.second
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user