¿Cuál es la sintaxis para los tipos genéricos anidados en Genie?
Quiero declarar un HasTable constring
como es clave yarray of int
como su valor:
[indent=4]
init
var h = new HashTable of string, array of int (str_hash, str_equal)
h["a"] = {1, 2, 3}
h["b"] = {5, 6, 7}
Mensaje de error:
nested_generic_types.gs:4.27-4.28: error: syntax error, expected line end or semicolon but got `of'
var h = new HashTable of string, array of int (str_hash, str_equal)
Entonces el dobleof
parece confundirvalac
aquí.
¿Cuál es la sintaxis adecuada?