mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 17:05:03 +01:00
UI test error annotations!
This commit is contained in:
parent
5e7e99982d
commit
a0efca50e0
42 changed files with 437 additions and 694 deletions
|
|
@ -1,3 +1,4 @@
|
|||
function main() = (
|
||||
let a: I32[I32] = 0;
|
||||
let _a: I32[I32] = 0;
|
||||
//~^ ERROR: type I32 does not take any generic arguments but 1 were passed
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
error: type I32 does not take any generic arguments but 1 were passed
|
||||
--> $DIR/generics_on_primitive.nil:2
|
||||
2 | let a: I32[I32] = 0;
|
||||
^^^
|
||||
warning: unused variable: `a`
|
||||
--> $DIR/generics_on_primitive.nil:2
|
||||
2 | let a: I32[I32] = 0;
|
||||
^
|
||||
--> ./ui-tests/type/generics/generics_on_primitive.nil:2
|
||||
2 | let _a: I32[I32] = 0;
|
||||
^^^
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
warning: unused function parameter: `a`
|
||||
--> $DIR/generics_structs_in_args.nil:11
|
||||
--> ./ui-tests/type/generics/generics_structs_in_args.nil:11
|
||||
11 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
warning: unused function parameter: `b`
|
||||
--> $DIR/generics_structs_in_args.nil:11
|
||||
--> ./ui-tests/type/generics/generics_structs_in_args.nil:11
|
||||
11 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
warning: unused function parameter: `c`
|
||||
--> $DIR/generics_structs_in_args.nil:11
|
||||
--> ./ui-tests/type/generics/generics_structs_in_args.nil:11
|
||||
11 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
warning: unused function parameter: `a`
|
||||
--> $DIR/structs.nil:9
|
||||
--> ./ui-tests/type/generics/structs.nil:9
|
||||
9 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
warning: unused function parameter: `b`
|
||||
--> $DIR/structs.nil:9
|
||||
--> ./ui-tests/type/generics/structs.nil:9
|
||||
9 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
warning: unused function parameter: `c`
|
||||
--> $DIR/structs.nil:9
|
||||
--> ./ui-tests/type/generics/structs.nil:9
|
||||
9 | function test(a: A[I32], b: B[I32, Int, I32], c: C) = ;
|
||||
^
|
||||
|
|
|
|||
|
|
@ -6,20 +6,26 @@ type B[T, U, V] = struct {
|
|||
type C = ();
|
||||
|
||||
function test(
|
||||
a1: A,
|
||||
a2: A[],
|
||||
a3: A[I32],
|
||||
a4: A[I32, I32],
|
||||
_a1: A,
|
||||
//~^ ERROR: missing generics for type A, expected 1, but only 0 were passed
|
||||
_a2: A[],
|
||||
//~^ ERROR: missing generics for type A, expected 1, but only 0 were passed
|
||||
_a3: A[I32],
|
||||
_a4: A[I32, I32],
|
||||
|
||||
b1: B,
|
||||
b2: B[],
|
||||
b3: B[Int, Int],
|
||||
b4: B[Int, I32, Int],
|
||||
b5: B[Int, Int, Int, Int],
|
||||
_b1: B,
|
||||
//~^ ERROR: missing generics for type B, expected 3, but only 0 were passed
|
||||
_b2: B[],
|
||||
//~^ ERROR: missing generics for type B, expected 3, but only 0 were passed
|
||||
_b3: B[Int, Int],
|
||||
//~^ ERROR: issing generics for type B, expected 3, but only 2 were passed
|
||||
_b4: B[Int, I32, Int],
|
||||
_b5: B[Int, Int, Int, Int],
|
||||
|
||||
c1: C,
|
||||
c2: C[],
|
||||
c3: C[I32],
|
||||
_c1: C,
|
||||
_c2: C[],
|
||||
_c3: C[I32],
|
||||
//~^ ERROR: type () does not take any generic arguments but 1 were passed
|
||||
) = ;
|
||||
|
||||
function main() = ;
|
||||
|
|
|
|||
|
|
@ -1,72 +1,24 @@
|
|||
error: missing generics for type A, expected 1, but only 0 were passed
|
||||
--> $DIR/wrong_amount.nil:9
|
||||
9 | a1: A,
|
||||
^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:9
|
||||
9 | _a1: A,
|
||||
^
|
||||
error: missing generics for type A, expected 1, but only 0 were passed
|
||||
--> $DIR/wrong_amount.nil:10
|
||||
10 | a2: A[],
|
||||
^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:11
|
||||
11 | _a2: A[],
|
||||
^
|
||||
error: missing generics for type B, expected 3, but only 0 were passed
|
||||
--> $DIR/wrong_amount.nil:14
|
||||
14 | b1: B,
|
||||
^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:16
|
||||
16 | _b1: B,
|
||||
^
|
||||
error: missing generics for type B, expected 3, but only 0 were passed
|
||||
--> $DIR/wrong_amount.nil:15
|
||||
15 | b2: B[],
|
||||
^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:18
|
||||
18 | _b2: B[],
|
||||
^
|
||||
error: missing generics for type B, expected 3, but only 2 were passed
|
||||
--> $DIR/wrong_amount.nil:16
|
||||
16 | b3: B[Int, Int],
|
||||
^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:20
|
||||
20 | _b3: B[Int, Int],
|
||||
^
|
||||
error: type () does not take any generic arguments but 1 were passed
|
||||
--> $DIR/wrong_amount.nil:22
|
||||
22 | c3: C[I32],
|
||||
^
|
||||
warning: unused function parameter: `a1`
|
||||
--> $DIR/wrong_amount.nil:9
|
||||
9 | a1: A,
|
||||
^^
|
||||
warning: unused function parameter: `a2`
|
||||
--> $DIR/wrong_amount.nil:10
|
||||
10 | a2: A[],
|
||||
^^
|
||||
warning: unused function parameter: `a3`
|
||||
--> $DIR/wrong_amount.nil:11
|
||||
11 | a3: A[I32],
|
||||
^^
|
||||
warning: unused function parameter: `a4`
|
||||
--> $DIR/wrong_amount.nil:12
|
||||
12 | a4: A[I32, I32],
|
||||
^^
|
||||
warning: unused function parameter: `b1`
|
||||
--> $DIR/wrong_amount.nil:14
|
||||
14 | b1: B,
|
||||
^^
|
||||
warning: unused function parameter: `b2`
|
||||
--> $DIR/wrong_amount.nil:15
|
||||
15 | b2: B[],
|
||||
^^
|
||||
warning: unused function parameter: `b3`
|
||||
--> $DIR/wrong_amount.nil:16
|
||||
16 | b3: B[Int, Int],
|
||||
^^
|
||||
warning: unused function parameter: `b4`
|
||||
--> $DIR/wrong_amount.nil:17
|
||||
17 | b4: B[Int, I32, Int],
|
||||
^^
|
||||
warning: unused function parameter: `b5`
|
||||
--> $DIR/wrong_amount.nil:18
|
||||
18 | b5: B[Int, Int, Int, Int],
|
||||
^^
|
||||
warning: unused function parameter: `c1`
|
||||
--> $DIR/wrong_amount.nil:20
|
||||
20 | c1: C,
|
||||
^^
|
||||
warning: unused function parameter: `c2`
|
||||
--> $DIR/wrong_amount.nil:21
|
||||
21 | c2: C[],
|
||||
^^
|
||||
warning: unused function parameter: `c3`
|
||||
--> $DIR/wrong_amount.nil:22
|
||||
22 | c3: C[I32],
|
||||
^^
|
||||
--> ./ui-tests/type/generics/wrong_amount.nil:27
|
||||
27 | _c3: C[I32],
|
||||
^
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
warning: unused variable: `a`
|
||||
--> $DIR/type_alias.nil:6
|
||||
--> ./ui-tests/type/type_alias.nil:6
|
||||
6 | let a: A = (0, 0);
|
||||
^
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
warning: unused variable: `a1`
|
||||
--> $DIR/type_assignments.nil:15
|
||||
--> ./ui-tests/type/type_assignments.nil:15
|
||||
15 | let a1: Int = a;
|
||||
^^
|
||||
warning: unused variable: `b1`
|
||||
--> $DIR/type_assignments.nil:16
|
||||
--> ./ui-tests/type/type_assignments.nil:16
|
||||
16 | let b1: I32 = b;
|
||||
^^
|
||||
warning: unused variable: `c1`
|
||||
--> $DIR/type_assignments.nil:17
|
||||
--> ./ui-tests/type/type_assignments.nil:17
|
||||
17 | let c1: String = c;
|
||||
^^
|
||||
warning: unused variable: `d1`
|
||||
--> $DIR/type_assignments.nil:18
|
||||
--> ./ui-tests/type/type_assignments.nil:18
|
||||
18 | let d1: Bool = d;
|
||||
^^
|
||||
warning: unused variable: `e1`
|
||||
--> $DIR/type_assignments.nil:19
|
||||
--> ./ui-tests/type/type_assignments.nil:19
|
||||
19 | let e1: CustomType = e;
|
||||
^^
|
||||
warning: unused variable: `f1`
|
||||
--> $DIR/type_assignments.nil:20
|
||||
--> ./ui-tests/type/type_assignments.nil:20
|
||||
20 | let f1: (Int, I32) = f;
|
||||
^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue