Fixed type unification for templates! Next up is adding to the scope for .
This commit is contained in:
@@ -250,6 +250,14 @@ fun make_ast_binding(s: str): *tree<ast> {
|
||||
fun make_ast_binding(s: str, v: vec<*binding<type>>): *tree<ast> {
|
||||
return _binding(s, v, binding<tree<ast>>())
|
||||
}
|
||||
fun clone_ast_binding(binding: *tree<ast>): *tree<ast> {
|
||||
match(binding->data) {
|
||||
ast::_binding(b) {
|
||||
return _binding(b.first, b.second, binding(b.third->bound_to))
|
||||
}
|
||||
}
|
||||
error("trying to get binding on not a binding")
|
||||
}
|
||||
fun get_ast_binding_inst_types(binding: *tree<ast>): ref vec<*binding<type>> {
|
||||
match(binding->data) {
|
||||
ast::_binding(b) {
|
||||
|
||||
@@ -71,7 +71,6 @@ fun shallow_equality(a: *type, b: *type):bool {
|
||||
}
|
||||
|
||||
fun inst_temp_type(t: *binding<type>, replacements: ref map<*binding<type>, *binding<type>>): *binding<type> {
|
||||
println("inst_temp_type " + to_string(t->bound_to))
|
||||
match (*t->bound_to) {
|
||||
type::_unknown() error("Unknown in temp type")
|
||||
type::_obj(o) {
|
||||
|
||||
Reference in New Issue
Block a user