mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 03:42:23 -07:00
CHECK 2 done
Add support for handling generic types in LLVM backend - Updated `lb_type_internal` to return a pointer type for unspecialized generics. - Modified `write_type_to_canonical_string` to handle specialized generics without panicking. - Enhanced `default_type` to return the default type of specialized generics when applicable.
This commit is contained in:
@@ -2932,6 +2932,10 @@ gb_internal Type *default_type(Type *type) {
|
||||
case Basic_UntypedString: return t_string;
|
||||
case Basic_UntypedRune: return t_rune;
|
||||
}
|
||||
} else if (type->kind == Type_Generic) {
|
||||
if (type->Generic.specialized) {
|
||||
return default_type(type->Generic.specialized);
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user