aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-08-01 15:38:50 +0100
committergingerBill <bill@gingerbill.org>2022-08-01 15:38:50 +0100
commit5168cf03a9c321de464c2709a37607ea9c1edbe8 (patch)
treebae885c2465ac59973a57f3046ecb20f0242d089 /src/parser.cpp
parentb886ae6515440da18dec7292c43e09835170a632 (diff)
Remove dead `#maybe` code
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 934b5afcd..ac3acef8a 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2548,21 +2548,15 @@ Ast *parse_operand(AstFile *f, bool lhs) {
syntax_error(tag, "Invalid union tag '#%.*s'", LIT(tag.string));
}
}
- if (no_nil && maybe) {
- syntax_error(f->curr_token, "#maybe and #no_nil cannot be applied together");
- }
+
if (no_nil && shared_nil) {
syntax_error(f->curr_token, "#shared_nil and #no_nil cannot be applied together");
}
- if (shared_nil && maybe) {
- syntax_error(f->curr_token, "#maybe and #shared_nil cannot be applied together");
- }
-
if (maybe) {
- union_kind = UnionType_maybe;
syntax_error(f->curr_token, "#maybe functionality has now been merged with standard 'union' functionality");
- } else if (no_nil) {
+ }
+ if (no_nil) {
union_kind = UnionType_no_nil;
} else if (shared_nil) {
union_kind = UnionType_shared_nil;