mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
17 lines
236 B
V
17 lines
236 B
V
struct Foo {}
|
|
|
|
type Alias = Foo
|
|
|
|
type SumType = Alias | int
|
|
|
|
fn main() {
|
|
_ = '${[1]:x}'
|
|
_ = '${[1]!:x}'
|
|
_ = '${Foo{}:x}'
|
|
_ = '${[1]:f}'
|
|
_ := '${none:F}'
|
|
_ = '${{"a": "b"}:x}'
|
|
_ = '${Alias(Foo{}):x}'
|
|
_ = '${SumType(int(5)):o}'
|
|
}
|