v2 / vlib / v / fmt / tests / import_with_alias_keep.vv
25 lines · 22 sloc · 450 bytes · 788520eb52709ded364597962b186b421336ba8d
Raw
1import os
2import time as t
3import some.library as slib
4import crypto.sha256
5import mymod.sha256 as mysha256
6
7type my_alias = fn (t slib.MyType)
8
9struct Foo {
10 bar t.Time
11 bars []t.Time
12 barref &t.Time
13 barrefs []&t.Time
14 c_type C.some_struct
15 js_type JS.other_struct
16}
17
18fn main() {
19 println('start')
20 t.sleep_ms(500)
21 println('end')
22 os.system('date')
23 v_hash := sha256.sum('hi'.bytes()).hex()
24 my_hash := mysha256.sum('hi'.bytes()).hex()
25}
26