diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-04 01:24:28 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-04 01:24:28 -0500 |
| commit | dc7289b239fafe29df44ced065cd8861ceb1fec3 (patch) | |
| tree | 4f6c1483bd8db4ea337b11b2796a9e0a3fdd9d3e | |
| parent | aabc0a3cff685e31f2492c977c6562d8e0ef8ebc (diff) | |
Fix for optional langs
| -rw-r--r-- | compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -272,7 +272,9 @@ CORD compile_type(type_t *t) case CStringType: case FunctionType: case ClosureType: case PointerType: case EnumType: case ChannelType: return compile_type(nonnull); - case IntType: case BigIntType: case TextType: case NumType: case BoolType: case ByteType: + case TextType: + return Match(nonnull, TextType)->lang ? compile_type(nonnull) : "OptionalText_t"; + case IntType: case BigIntType: case NumType: case BoolType: case ByteType: case ArrayType: case TableType: case SetType: case DateTimeType: return CORD_all("Optional", compile_type(nonnull)); case StructType: { |
