瀏覽代碼

Fix `type_elem_type` for `complex32` and `quaternion64`

gingerBill 1 年之前
父節點
當前提交
bf90b61908
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/check_builtin.cpp

+ 2 - 0
src/check_builtin.cpp

@@ -4892,8 +4892,10 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
 			switch (bt->kind) {
 			switch (bt->kind) {
 			case Type_Basic:
 			case Type_Basic:
 				switch (bt->Basic.kind) {
 				switch (bt->Basic.kind) {
+				case Basic_complex32:  operand->type = t_f16; break;
 				case Basic_complex64:  operand->type = t_f32; break;
 				case Basic_complex64:  operand->type = t_f32; break;
 				case Basic_complex128: operand->type = t_f64; break;
 				case Basic_complex128: operand->type = t_f64; break;
+				case Basic_quaternion64:  operand->type = t_f16; break;
 				case Basic_quaternion128: operand->type = t_f32; break;
 				case Basic_quaternion128: operand->type = t_f32; break;
 				case Basic_quaternion256: operand->type = t_f64; break;
 				case Basic_quaternion256: operand->type = t_f64; break;
 				}
 				}