ci: fix generic_fn_infer_struct_test.v
parent
ad231cec2f
commit
675f8b6300
|
@ -1,35 +1,26 @@
|
|||
|
||||
|
||||
// Sumtype
|
||||
type FooBar= Foo | Bar
|
||||
pub type PublicBar = Foo | Bar | FooBar
|
||||
type FooBar = Bar | Foo
|
||||
pub type PublicBar = Bar | Foo | FooBar
|
||||
|
||||
type Uint = u8 |u16 | u64
|
||||
| u32 // This should stay on the same line
|
||||
type
|
||||
Float =
|
||||
f32 |
|
||||
f64
|
||||
type Uint = u16 | u32 | u64 | u8 // This should stay on the same line
|
||||
type Float = f32 | f64
|
||||
|
||||
// Alias type
|
||||
type MyInt = int
|
||||
|
||||
pub type Abc = f32
|
||||
|
||||
|
||||
// Fn type decl
|
||||
|
||||
type EmptyFn = fn ()
|
||||
type OneArgFn =
|
||||
fn (i int)
|
||||
type TwoDiffArgs
|
||||
= fn (i int, s string) bool
|
||||
|
||||
type OneArgFn = fn (i int)
|
||||
|
||||
type TwoDiffArgs = fn (i int, s string) bool
|
||||
|
||||
type TwoSameArgs = fn (i int, j int) string // And a comment
|
||||
|
||||
type VarArgs = fn
|
||||
(s ...string) int
|
||||
type VarArgs = fn (s ...string) int
|
||||
|
||||
type NOVarArgs = fn (i int, s ...string) f64
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ fn test_generics_fn_infer_struct() {
|
|||
assert ret1.contains('Node<int>{')
|
||||
assert ret1.contains('data: 0')
|
||||
|
||||
ret2 := foo(Node<byte>{})
|
||||
ret2 := foo(Node<u8>{})
|
||||
println(ret2)
|
||||
assert ret2.contains('Node<byte>{')
|
||||
assert ret2.contains('Node<u8>{')
|
||||
assert ret2.contains('data: 0')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue