cast currently does not complain when casting to a generic (even though that operation doesn't make any sense). For example this should not compile:
(bind-func get_children:[List*,Tree*]*
"Get all children of the tree"
(lambda (tree)
(let ((children_list (tref tree 2)))
(cast children_list List)
)))
This function should actually be (where the type being casted to is a concrete type):
(bind-func get_children:[List*,Tree*]*
"Get all children of the tree"
(lambda (tree)
(let ((children_list (tref tree 2)))
(cast children_list List{Tree*}*)
)))
Extempore's behaviour after casting to a generic is rather unpredictable, either complaining about types or going into an infinite loop.
cast
currently does not complain when casting to a generic (even though that operation doesn't make any sense). For example this should not compile:This function should actually be (where the type being casted to is a concrete type):
Extempore's behaviour after
cast
ing to a generic is rather unpredictable, either complaining about types or going into an infinite loop.Thanks to @benswift for identifying this.