summaryrefslogtreecommitdiff
path: root/src/parsing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsing.h')
-rw-r--r--src/parsing.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parsing.h b/src/parsing.h
index c6a3b8a83..3304122f2 100644
--- a/src/parsing.h
+++ b/src/parsing.h
@@ -213,7 +213,10 @@ inline Expression* parseConst(cashew::IString s, Type type, MixedArena& allocato
ret->value = Literal(strtod(str, &end));
break;
}
- default: return nullptr;
+ case none:
+ case unreachable: {
+ return nullptr;
+ }
}
if (ret->value.type != type) {
throw ParseException("parsed type does not match expected type");