1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

mutable args: don't allow primitives

This commit is contained in:
Alexander Medvednikov
2019-07-24 15:24:32 +02:00
parent 7ea688aa43
commit 6b2063a2ea
3 changed files with 39 additions and 6 deletions

View File

@@ -113,6 +113,10 @@ fn is_float_type(typ string) bool {
return FLOAT_TYPES.contains(typ)
}
fn is_primitive_type(typ string) bool {
return is_number_type(typ) || typ == 'string'
}
fn new_table(obfuscate bool) *Table {
mut t := &Table {
obf_ids: map[string]int{}