Commit 4a8087d2 authored by Hugo Moreau's avatar Hugo Moreau
Browse files

pass triggering errors for use of maps

parent c46c3122
package main
import "fmt"
func main() {
var m = map[string]int{
"one": 1,
"two": 2,
"three": 3,
"four": 4,
"five": 5,
}
fmt.Println(m)
}
......@@ -15,6 +15,7 @@ The TypeChecker triggers errors for uses of :
- Panic
- Pointer
- Interface
- Map
*/
type TypeChecker struct {
......@@ -52,6 +53,9 @@ func (t *TypeChecker) Pre(meta *Meta, v *Visitor) bool {
fmt.Println("Panics are not supported.")
os.Exit(1)
}
case *ast.MapType:
fmt.Println("Maps are not supported.")
os.Exit(1)
case *ast.StructType:
fmt.Println("Structs are not supported.")
os.Exit(1)
......
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