diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-30 15:13:28 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-30 16:45:41 +0100 |
| commit | f70cea508cd30fa40770ea989fe2a19e715a357b (patch) | |
| tree | 731bb96b375dc8fd0f7e5a2a7e1d1fe5cb2a600e /tests/typ/compiler/ops-invalid.typ | |
| parent | fe1f4400693690b68db5a7ec0976ba998624a740 (diff) | |
Remove index syntax in favor of accessor methods
Diffstat (limited to 'tests/typ/compiler/ops-invalid.typ')
| -rw-r--r-- | tests/typ/compiler/ops-invalid.typ | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/typ/compiler/ops-invalid.typ b/tests/typ/compiler/ops-invalid.typ index 3d41a3d1..d51e42fb 100644 --- a/tests/typ/compiler/ops-invalid.typ +++ b/tests/typ/compiler/ops-invalid.typ @@ -90,14 +90,14 @@ { let x = 2 for _ in range(61) { - x *= 2 + (x) *= 2 } // Error: 4-18 cannot repeat this string 4611686018427387904 times {x * "abcdefgh"} } --- -// Error: 3-6 cannot mutate a temporary value +// Error: 4-5 unknown variable { (x) = "" } --- @@ -105,6 +105,15 @@ { 1 + 2 += 3 } --- +// Error: 2:2-2:7 cannot apply 'not' to string +#let x = "Hey" +{not x = "a"} + +--- +// Error: 7-8 unknown variable +{ 1 + x += 3 } + +--- // Error: 3-4 unknown variable { z = 1 } |
