diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-09-20 22:59:46 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-09-20 22:59:46 +0100 |
| commit | 3bfaac08446e36caaf83fb2121abdbfeb04e261e (patch) | |
| tree | fbeabc6f08192caafc5b679ebbf651409bb3f7d0 /src/check_expr.cpp | |
| parent | 14d0cbf6d77e180fb752b468ad78aa3a689726fb (diff) | |
Fix decimal.odin assignment bug
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 13b066835..d33cee97b 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3324,7 +3324,6 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type } if (out_value) *out_value = v; - switch (type->Basic.kind) { // case Basic_f16: case Basic_f32: @@ -3333,6 +3332,8 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type case Basic_UntypedFloat: return true; + + default: GB_PANIC("Compiler error: Unknown float type!"); break; } } else if (is_type_complex(type)) { ExactValue v = exact_value_to_complex(in_value); @@ -3353,6 +3354,8 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type } break; case Basic_UntypedComplex: return true; + + default: GB_PANIC("Compiler error: Unknown complex type!"); break; } return false; |