summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-11-28 12:31:29 -0800
committerOri Bernstein <ori@markovcorp.com>2017-11-28 12:31:29 -0800
commit83eef0360e0c66ff50d2874e1829470101e2afab (patch)
tree29c0778212331835a54f3886f39a02da78e90d2a /parse/infer.c
parent1af62a6b4e9e10444098c57f64b1ad1b9cb03b95 (diff)
downloadmc-83eef0360e0c66ff50d2874e1829470101e2afab.tar.gz
Remove impossible checks.
None of the removed variants on syntax trees should be possible in a working compiler.
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/parse/infer.c b/parse/infer.c
index b299599..20360ac 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1387,14 +1387,8 @@ checkns(Node *n, Node **ret)
Node *s;
/* check that this is a namespaced declaration */
- if (n->type != Nexpr)
- return n;
- if (exprop(n) != Omemb)
- return n;
- if (!n->expr.nargs)
- return n;
args = n->expr.args;
- if (args[0]->type != Nexpr || exprop(args[0]) != Ovar)
+ if (n->type != Nexpr || exprop(n) != Omemb || exprop(args[0]) != Ovar)
return n;
name = args[0]->expr.args[0];
stab = getns(namestr(name));