forked from M-Labs/artiq
compiler: Fix multi-dim slice error message test, tweak wording
This commit is contained in:
parent
d35f659d25
commit
53d64d08a8
@ -240,7 +240,7 @@ class Inferencer(algorithm.Visitor):
|
|||||||
if not builtins.is_array(node.value.type):
|
if not builtins.is_array(node.value.type):
|
||||||
diag = diagnostic.Diagnostic(
|
diag = diagnostic.Diagnostic(
|
||||||
"error",
|
"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)},
|
{"type": types.TypePrinter().name(node.value.type)},
|
||||||
node.loc, [])
|
node.loc, [])
|
||||||
self.engine.process(diag)
|
self.engine.process(diag)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
x = []
|
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]
|
x[1,2]
|
||||||
|
|
||||||
# CHECK-L: ${LINE:+1}: error: multi-dimensional slices are not supported
|
# CHECK-L: ${LINE:+1}: error: multi-dimensional slices are not supported
|
||||||
|
Loading…
Reference in New Issue
Block a user