diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-17 10:18:58 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-17 10:18:58 +0200 |
| commit | a0e1740227535adc3151c02eb102c4f96b4f9731 (patch) | |
| tree | 0e29cd3719370eca8c74fb67480f3bfc1a207106 /testsuite/compilable | |
| parent | d0a666507a6f11b65170c257fd483613f462f3f2 (diff) | |
| download | elna-a0e1740227535adc3151c02eb102c4f96b4f9731.tar.gz | |
Implement type constness
Diffstat (limited to 'testsuite/compilable')
| -rw-r--r-- | testsuite/compilable/float_literals.elna | 10 | ||||
| -rw-r--r-- | testsuite/compilable/pointer_const_conversion.elna | 7 | ||||
| -rw-r--r-- | testsuite/compilable/take_const_address.elna | 7 |
3 files changed, 19 insertions, 5 deletions
diff --git a/testsuite/compilable/float_literals.elna b/testsuite/compilable/float_literals.elna index ed23989..77af6b1 100644 --- a/testsuite/compilable/float_literals.elna +++ b/testsuite/compilable/float_literals.elna @@ -1,9 +1,9 @@ proc f() -const - x := 3.14 - y := 1e10 - z := 4.567e8 - t := 2.5E-3 +var + x: const Float := 3.14 + y: const Float := 1e10 + z: const Float := 4.567e8 + t: const Float := 2.5E-3 return end. diff --git a/testsuite/compilable/pointer_const_conversion.elna b/testsuite/compilable/pointer_const_conversion.elna new file mode 100644 index 0000000..fd8e097 --- /dev/null +++ b/testsuite/compilable/pointer_const_conversion.elna @@ -0,0 +1,7 @@ +var + x: Int + p: ^const Int + +begin + p := @x +end. diff --git a/testsuite/compilable/take_const_address.elna b/testsuite/compilable/take_const_address.elna new file mode 100644 index 0000000..54a2992 --- /dev/null +++ b/testsuite/compilable/take_const_address.elna @@ -0,0 +1,7 @@ +var + x: ^const Int + y: const Int + +begin + x := @y +end. |
