Commit 664550b9 authored by Hugo Moreau's avatar Hugo Moreau
Browse files

Checktype: Multidimensional arrays trigger panic

Multidimensional arrays are not treated yet, so a panic is triggered if
go2pins encounters one.

 * transform/checktype.go : Here.
parent 9fef68f1
Pipeline #27112 passed with stage
in 2 minutes and 21 seconds
......@@ -91,6 +91,11 @@ func (t *TypeChecker) Pre(meta *Meta, v *Visitor) bool {
if node.Name == "panic" {
panic("Panics are not supported.")
}
case *ast.IndexExpr:
switch node.X.(type) {
case *ast.IndexExpr:
panic("Multidimensional arrays are not supported")
}
case *ast.InterfaceType:
panic("Interfaces are not supported.")
case *ast.MapType:
......
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