diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-11 12:56:16 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-11 12:56:16 -0400 |
| commit | 02930b84f821b22cfd629b64169dc0b5a4b8fe74 (patch) | |
| tree | c3b68dd707ff88baae6304366fec75bdd5e19cc0 /compile.c | |
| parent | 908673c9d95a57e794dc1ee5708ffb511958abb9 (diff) | |
Optionals for threads
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,7 +27,9 @@ static CORD promote_to_optional(type_t *t, CORD code); CORD promote_to_optional(type_t *t, CORD code) { - if (t->tag == IntType) { + if (t == THREAD_TYPE) { + return code; + } else if (t->tag == IntType) { switch (Match(t, IntType)->bits) { case TYPE_IBITS8: return CORD_all("((OptionalInt8_t){.i=", code, "})"); case TYPE_IBITS16: return CORD_all("((OptionalInt16_t){.i=", code, "})"); |
