mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
16 lines
161 B
V
16 lines
161 B
V
|
|
type Myint int
|
|
type Myf32 f32
|
|
type Myf64 f64
|
|
|
|
fn test_type_alias() {
|
|
i := Myint(10)
|
|
assert i + 100 == 110
|
|
|
|
f := Myf64(10.4)
|
|
assert f + 0.5 == 10.9
|
|
|
|
|
|
|
|
}
|