diff options
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. |
