master
1test "type coercion - variable declaration" {
2 const a: u8 = 1;
3 const b: u16 = a;
4 _ = b;
5}
6
7test "type coercion - function call" {
8 const a: u8 = 1;
9 foo(a);
10}
11
12fn foo(b: u16) void {
13 _ = b;
14}
15
16test "type coercion - @as builtin" {
17 const a: u8 = 1;
18 const b = @as(u16, a);
19 _ = b;
20}
21
22// test