Commit 9df49f78 authored by Hugo Moreau's avatar Hugo Moreau Committed by Etienne Renault
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 51040e31
......@@ -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