@@ -29,7 +29,7 @@ func (c *Compiler) emitMapLookup(keyType, valueType types.Type, m, key llvm.Valu
29
29
params := []llvm.Value {m , keyPtr , mapValuePtr }
30
30
commaOkValue = c .createRuntimeCall ("hashmapBinaryGet" , params , "" )
31
31
} else {
32
- return llvm.Value {}, c .makeError (pos , "todo: map lookup key type : " + keyType .String ())
32
+ return llvm.Value {}, c .makeError (pos , "only strings, bools, ints or structs of bools/ints are supported as map keys, but got : " + keyType .String ())
33
33
}
34
34
mapValue := c .builder .CreateLoad (mapValueAlloca , "" )
35
35
if commaOk {
@@ -61,7 +61,7 @@ func (c *Compiler) emitMapUpdate(keyType types.Type, m, key, value llvm.Value, p
61
61
c .createRuntimeCall ("hashmapBinarySet" , params , "" )
62
62
return nil
63
63
} else {
64
- return c .makeError (pos , "todo: map update key type : " + keyType .String ())
64
+ return c .makeError (pos , "only strings, bools, ints or structs of bools/ints are supported as map keys, but got : " + keyType .String ())
65
65
}
66
66
}
67
67
@@ -80,7 +80,7 @@ func (c *Compiler) emitMapDelete(keyType types.Type, m, key llvm.Value, pos toke
80
80
c .createRuntimeCall ("hashmapBinaryDelete" , params , "" )
81
81
return nil
82
82
} else {
83
- return c .makeError (pos , "todo: map delete key type : " + keyType .String ())
83
+ return c .makeError (pos , "only strings, bools, ints or structs of bools/ints are supported as map keys, but got : " + keyType .String ())
84
84
}
85
85
}
86
86
0 commit comments