aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-30 21:07:48 +0200
committerEugen Wissner <belka@caraus.de>2026-08-30 21:07:48 +0200
commitdbca249757a98d6d56e23db43baa93ad30a91709 (patch)
treeeaf664d63c7752aabad7994f62e92ae6492e655d /testsuite
parent491e62664394a8689a3f8904fbe8dbc3dea05524 (diff)
downloadelna-dbca249757a98d6d56e23db43baa93ad30a91709.tar.gz
Use arrow -> for return types
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/compilable/opaque_type.elna2
-rw-r--r--testsuite/compilable/pointer_subtraction.elna2
-rw-r--r--testsuite/compilable/procedure_forward_reference.elna4
-rw-r--r--testsuite/fail_compilation/access_record_type_field.elna2
-rw-r--r--testsuite/fail_compilation/enumeration_member_missing.elna2
-rw-r--r--testsuite/fail_compilation/non_constant_array_dimension.elna.s1
-rw-r--r--testsuite/fail_compilation/procedure-cycle.elna2
-rw-r--r--testsuite/fail_compilation/record-base-cycle.elna.s1
-rw-r--r--testsuite/fail_compilation/unary_minus_on_record.elna2
-rw-r--r--testsuite/fail_compilation/unary_negation_on_record.elna2
-rw-r--r--testsuite/fail_compilation/unary_plus_on_record.elna2
-rw-r--r--testsuite/runnable/aggregate_argument.elna2
-rw-r--r--testsuite/runnable/aggregate_equality.elna2
-rw-r--r--testsuite/runnable/define_multiple_local_variables.elna2
-rw-r--r--testsuite/runnable/multi_module/helper.elna2
-rw-r--r--testsuite/runnable/procedure_cast.elna6
-rw-r--r--testsuite/runnable/recursive_record.elna6
-rw-r--r--testsuite/runnable/return_aggregate.elna2
-rw-r--r--testsuite/runnable/two_fields_same_type.elna2
-rw-r--r--testsuite/runnable/two_parameters_same_type.elna2
-rw-r--r--testsuite/runnable/unary_plus.elna2
21 files changed, 24 insertions, 26 deletions
diff --git a/testsuite/compilable/opaque_type.elna b/testsuite/compilable/opaque_type.elna
index b46cf68..bdbf0d6 100644
--- a/testsuite/compilable/opaque_type.elna
+++ b/testsuite/compilable/opaque_type.elna
@@ -6,7 +6,7 @@ var
handle: ^Handle := nil
alias: ^Alias
-proc take(h: ^Handle): ^Handle
+proc take(h: ^Handle) -> ^Handle
return h
begin
diff --git a/testsuite/compilable/pointer_subtraction.elna b/testsuite/compilable/pointer_subtraction.elna
index c268113..8dd1ff6 100644
--- a/testsuite/compilable/pointer_subtraction.elna
+++ b/testsuite/compilable/pointer_subtraction.elna
@@ -1,4 +1,4 @@
-proc test(a, b: ^Char): Int
+proc test(a, b: ^Char) -> Int
return a - b
end.
diff --git a/testsuite/compilable/procedure_forward_reference.elna b/testsuite/compilable/procedure_forward_reference.elna
index bbffc73..cdf3008 100644
--- a/testsuite/compilable/procedure_forward_reference.elna
+++ b/testsuite/compilable/procedure_forward_reference.elna
@@ -1,7 +1,7 @@
-proc first(): Int
+proc first() -> Int
return second() + 1
-proc second(): Int
+proc second() -> Int
return 41
end.
diff --git a/testsuite/fail_compilation/access_record_type_field.elna b/testsuite/fail_compilation/access_record_type_field.elna
index 4e8bc6a..4378404 100644
--- a/testsuite/fail_compilation/access_record_type_field.elna
+++ b/testsuite/fail_compilation/access_record_type_field.elna
@@ -3,7 +3,7 @@ type
field1, field2: Int
end
-proc f(): Int
+proc f() -> Int
return R.field1 (* @Error Cannot access field 'field1' on type 'R' *)
end.
diff --git a/testsuite/fail_compilation/enumeration_member_missing.elna b/testsuite/fail_compilation/enumeration_member_missing.elna
index 84a13d1..6f82131 100644
--- a/testsuite/fail_compilation/enumeration_member_missing.elna
+++ b/testsuite/fail_compilation/enumeration_member_missing.elna
@@ -1,7 +1,7 @@
type
Enumeration = (one, two, three)
-proc f(): Enumeration
+proc f() -> Enumeration
return Enumeration.four (* @Error Enumeration 'Enumeration' does not have a member named 'four' *)
end.
diff --git a/testsuite/fail_compilation/non_constant_array_dimension.elna.s b/testsuite/fail_compilation/non_constant_array_dimension.elna.s
deleted file mode 100644
index 8dc704d..0000000
--- a/testsuite/fail_compilation/non_constant_array_dimension.elna.s
+++ /dev/null
@@ -1 +0,0 @@
- .file "non_constant_array_dimension.elna"
diff --git a/testsuite/fail_compilation/procedure-cycle.elna b/testsuite/fail_compilation/procedure-cycle.elna
index aaed14c..796cccf 100644
--- a/testsuite/fail_compilation/procedure-cycle.elna
+++ b/testsuite/fail_compilation/procedure-cycle.elna
@@ -1,3 +1,3 @@
type
- A = proc(): A (* @Error Type declaration forms a cycle: A -> A *)
+ A = proc() -> A (* @Error Type declaration forms a cycle: A -> A *)
end.
diff --git a/testsuite/fail_compilation/record-base-cycle.elna.s b/testsuite/fail_compilation/record-base-cycle.elna.s
deleted file mode 100644
index 64f8722..0000000
--- a/testsuite/fail_compilation/record-base-cycle.elna.s
+++ /dev/null
@@ -1 +0,0 @@
- .file "record-base-cycle.elna"
diff --git a/testsuite/fail_compilation/unary_minus_on_record.elna b/testsuite/fail_compilation/unary_minus_on_record.elna
index cfd76a2..d86995b 100644
--- a/testsuite/fail_compilation/unary_minus_on_record.elna
+++ b/testsuite/fail_compilation/unary_minus_on_record.elna
@@ -3,7 +3,7 @@ type
x: Int
end
-proc f(r: R): Int
+proc f(r: R) -> Int
return -r (* @Error Type 'R' cannot be used with unary '-' *)
end.
diff --git a/testsuite/fail_compilation/unary_negation_on_record.elna b/testsuite/fail_compilation/unary_negation_on_record.elna
index 370f04d..d08d2e3 100644
--- a/testsuite/fail_compilation/unary_negation_on_record.elna
+++ b/testsuite/fail_compilation/unary_negation_on_record.elna
@@ -3,7 +3,7 @@ type
x: Int
end
-proc f(r: R): Int
+proc f(r: R) -> Int
return ~r (* @Error Type 'R' cannot be used with unary '~' *)
end.
diff --git a/testsuite/fail_compilation/unary_plus_on_record.elna b/testsuite/fail_compilation/unary_plus_on_record.elna
index 7289873..e1f6f4c 100644
--- a/testsuite/fail_compilation/unary_plus_on_record.elna
+++ b/testsuite/fail_compilation/unary_plus_on_record.elna
@@ -3,7 +3,7 @@ type
x: Int
end
-proc f(r: R): Int
+proc f(r: R) -> Int
return +r (* @Error Type 'R' cannot be used with unary '\+' *)
end.
diff --git a/testsuite/runnable/aggregate_argument.elna b/testsuite/runnable/aggregate_argument.elna
index 4a36c74..875265e 100644
--- a/testsuite/runnable/aggregate_argument.elna
+++ b/testsuite/runnable/aggregate_argument.elna
@@ -4,7 +4,7 @@ type
b: Int
end
-proc f(r: R): Bool
+proc f(r: R) -> Bool
return r.a = 1 & r.b = 2
begin
diff --git a/testsuite/runnable/aggregate_equality.elna b/testsuite/runnable/aggregate_equality.elna
index 592d411..bfe2174 100644
--- a/testsuite/runnable/aggregate_equality.elna
+++ b/testsuite/runnable/aggregate_equality.elna
@@ -4,7 +4,7 @@ type
b: Int
end
-proc f(): Bool
+proc f() -> Bool
return R{a: 1, b: 2} = R{a: 1, b: 2}
begin
diff --git a/testsuite/runnable/define_multiple_local_variables.elna b/testsuite/runnable/define_multiple_local_variables.elna
index 51b99ac..8e44da4 100644
--- a/testsuite/runnable/define_multiple_local_variables.elna
+++ b/testsuite/runnable/define_multiple_local_variables.elna
@@ -1,4 +1,4 @@
-proc f(): Bool
+proc f() -> Bool
var
a, b: Int := 5
return a = 5 & b = 5
diff --git a/testsuite/runnable/multi_module/helper.elna b/testsuite/runnable/multi_module/helper.elna
index 9148ba6..5fd68af 100644
--- a/testsuite/runnable/multi_module/helper.elna
+++ b/testsuite/runnable/multi_module/helper.elna
@@ -1,4 +1,4 @@
-proc multiply*(x, y: Int): Int
+proc multiply*(x, y: Int) -> Int
return x * y
end.
diff --git a/testsuite/runnable/procedure_cast.elna b/testsuite/runnable/procedure_cast.elna
index 27977e1..ee97a6b 100644
--- a/testsuite/runnable/procedure_cast.elna
+++ b/testsuite/runnable/procedure_cast.elna
@@ -1,9 +1,9 @@
-var cb: proc(x: ^Char): Int
+var cb: proc(x: ^Char) -> Int
-proc probe_int(x: ^Int): Int
+proc probe_int(x: ^Int) -> Int
return 42
begin
- cb := cast(probe_int: proc(x: ^Char): Int);
+ cb := cast(probe_int: proc(x: ^Char) -> Int);
assert(cb(nil) = 42)
end.
diff --git a/testsuite/runnable/recursive_record.elna b/testsuite/runnable/recursive_record.elna
index 6f6b4fa..237eece 100644
--- a/testsuite/runnable/recursive_record.elna
+++ b/testsuite/runnable/recursive_record.elna
@@ -9,13 +9,13 @@ var
second: ^Node
third: ^Node
-proc malloc(size: Word): Pointer
+proc malloc(size: Word) -> Pointer
extern
proc free(ptr: Pointer)
extern
-proc sum(node: ^Node): Int
+proc sum(node: ^Node) -> Int
var
result: Int
begin
@@ -25,7 +25,7 @@ begin
else
result := node^.value + sum(node^.next)
end;
- return result
+return result
begin
first := malloc(#size(Node));
diff --git a/testsuite/runnable/return_aggregate.elna b/testsuite/runnable/return_aggregate.elna
index 90c1677..fbc1a08 100644
--- a/testsuite/runnable/return_aggregate.elna
+++ b/testsuite/runnable/return_aggregate.elna
@@ -4,7 +4,7 @@ type
b: Int
end
-proc f(): R
+proc f() -> R
return R{ a: 1, b: 2 }
begin
diff --git a/testsuite/runnable/two_fields_same_type.elna b/testsuite/runnable/two_fields_same_type.elna
index 649dd25..71dcbee 100644
--- a/testsuite/runnable/two_fields_same_type.elna
+++ b/testsuite/runnable/two_fields_same_type.elna
@@ -3,7 +3,7 @@ type
x, y: Int
end
-proc f(): Int
+proc f() -> Int
var
r: R := R{x: 3, y: 2}
return r.x + r.y
diff --git a/testsuite/runnable/two_parameters_same_type.elna b/testsuite/runnable/two_parameters_same_type.elna
index bd9b271..105a40c 100644
--- a/testsuite/runnable/two_parameters_same_type.elna
+++ b/testsuite/runnable/two_parameters_same_type.elna
@@ -1,4 +1,4 @@
-proc f(x, y: Int): Int
+proc f(x, y: Int) -> Int
return x + y
begin
diff --git a/testsuite/runnable/unary_plus.elna b/testsuite/runnable/unary_plus.elna
index 2bc69f3..bfd59d6 100644
--- a/testsuite/runnable/unary_plus.elna
+++ b/testsuite/runnable/unary_plus.elna
@@ -1,4 +1,4 @@
-proc f(x: Int): Int
+proc f(x: Int) -> Int
return +x
begin