diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-01 10:56:57 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-01 10:56:57 +0100 |
| commit | b3e788b9d95a9d04fb5f178fde13e73be95e7c04 (patch) | |
| tree | 66642389bbb556e958e9ed8937719ddd7f06256c /src | |
| parent | 63bb26c0e0964a0a08d43bd2029e935988da65f6 (diff) | |
Fix missing complex32/quaternion64 checks
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 2 | ||||
| -rw-r--r-- | src/checker.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 5a1cf138f..411ee58dd 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1574,6 +1574,7 @@ bool check_representable_as_constant(CheckerContext *c, ExactValue in_value, Typ } switch (type->Basic.kind) { + case Basic_complex32: case Basic_complex64: case Basic_complex128: { ExactValue real = exact_value_real(v); @@ -1599,6 +1600,7 @@ bool check_representable_as_constant(CheckerContext *c, ExactValue in_value, Typ } switch (type->Basic.kind) { + case Basic_quaternion64: case Basic_quaternion128: case Basic_quaternion256: { ExactValue real = exact_value_real(v); diff --git a/src/checker.cpp b/src/checker.cpp index a34e02c07..7e69363ff 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -4456,7 +4456,9 @@ void check_unchecked_bodies(Checker *c) { GB_ASSERT(pl != nullptr); pi.body = pl->ProcLit.body; pi.tags = pl->ProcLit.tags; - GB_ASSERT(pi.body != nullptr); + if (pi.body == nullptr) { + continue; + } check_proc_info(c, pi); } |