Commit e2a63aee authored by Hugo Moreau's avatar Hugo Moreau
Browse files

New pass triggering panic for not int array

* transform/checktype.go: Here.
parent 4dac58ae
Pipeline #14827 passed with stage
in 1 minute and 8 seconds
......@@ -37,8 +37,13 @@ func (t *TypeChecker) Pre(meta *Meta, v *Visitor) bool {
if rhn.Kind != token.INT {
panic("Non-integer values are not supported.")
}
case *ast.CompositeLit:
panic("Arrays are not supported.")
case *ast.ArrayType:
switch ident := rhn.Elt.(type) {
case *ast.Ident:
if ident.Name != "int" {
panic("Not int arrays are not supported.")
}
}
}
switch lhn := node.Lhs[i].(type) {
case *ast.Ident:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment