Commit 2549b1bb authored by Hugo Moreau's avatar Hugo Moreau
Browse files

pass triggering errors for use of switch

parent 4a8087d2
package main
import "fmt"
func main() {
i := 2
switch i {
case 1:
fmt.Println("i = 1")
case 2:
fmt.Println("i = 2")
}
}
......@@ -62,6 +62,9 @@ func (t *TypeChecker) Pre(meta *Meta, v *Visitor) bool {
case *ast.ChanType:
fmt.Println("Channels are not supported.")
os.Exit(1)
case *ast.SwitchStmt:
fmt.Println("Switch are not supported.")
os.Exit(1)
}
return true
}
......
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