Commit bc88ef2dc3

Andrew Kelley <superjoe30@gmail.com>
2018-09-04 04:47:23
compile errors for unimplemented minValue/maxValue builtins
1 parent e82cd53
Changed files (2)
src/analyze.cpp
@@ -5624,8 +5624,6 @@ void eval_min_max_value(CodeGen *g, TypeTableEntry *type_entry, ConstExprValue *
     if (type_entry->id == TypeTableEntryIdInt) {
         const_val->special = ConstValSpecialStatic;
         eval_min_max_value_int(g, type_entry, &const_val->data.x_bigint, is_max);
-    } else if (type_entry->id == TypeTableEntryIdFloat) {
-        zig_panic("TODO analyze_min_max_value float");
     } else if (type_entry->id == TypeTableEntryIdBool) {
         const_val->special = ConstValSpecialStatic;
         const_val->data.x_bool = is_max;
src/ir.cpp
@@ -16482,12 +16482,6 @@ static TypeTableEntry *ir_analyze_min_max(IrAnalyze *ira, IrInstruction *source_
                 eval_min_max_value(ira->codegen, target_type, out_val, is_max);
                 return ira->codegen->builtin_types.entry_num_lit_int;
             }
-        case TypeTableEntryIdFloat:
-            {
-                ConstExprValue *out_val = ir_build_const_from(ira, source_instruction);
-                eval_min_max_value(ira->codegen, target_type, out_val, is_max);
-                return ira->codegen->builtin_types.entry_num_lit_float;
-            }
         case TypeTableEntryIdBool:
         case TypeTableEntryIdVoid:
             {
@@ -16496,7 +16490,7 @@ static TypeTableEntry *ir_analyze_min_max(IrAnalyze *ira, IrInstruction *source_
                 return target_type;
             }
         case TypeTableEntryIdEnum:
-            zig_panic("TODO min/max value for enum type");
+        case TypeTableEntryIdFloat:
         case TypeTableEntryIdMetaType:
         case TypeTableEntryIdUnreachable:
         case TypeTableEntryIdPointer: