2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 03:38:25 +08:00

compiler: Fix multi-dim slice error message test, tweak wording

This commit is contained in:
David Nadlinger 2020-08-09 23:14:56 +01:00
parent d35f659d25
commit 53d64d08a8
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ class Inferencer(algorithm.Visitor):
if not builtins.is_array(node.value.type):
diag = diagnostic.Diagnostic(
"error",
"multi-dimensional slices only supported for arrays, not {type}",
"multi-dimensional indexing only supported for arrays, not {type}",
{"type": types.TypePrinter().name(node.value.type)},
node.loc, [])
self.engine.process(diag)

View File

@ -3,7 +3,7 @@
x = []
# CHECK-L: ${LINE:+1}: error: multi-dimensional slices are not supported
# CHECK-L: ${LINE:+1}: error: multi-dimensional indexing only supported for arrays
x[1,2]
# CHECK-L: ${LINE:+1}: error: multi-dimensional slices are not supported