diff options
author | Ori Bernstein <ori@eigenstate.org> | 2017-11-28 12:31:29 -0800 |
---|---|---|
committer | Ori Bernstein <ori@markovcorp.com> | 2017-11-28 12:31:29 -0800 |
commit | 83eef0360e0c66ff50d2874e1829470101e2afab (patch) | |
tree | 29c0778212331835a54f3886f39a02da78e90d2a /parse | |
parent | 1af62a6b4e9e10444098c57f64b1ad1b9cb03b95 (diff) | |
download | mc-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')
-rw-r--r-- | parse/infer.c | 8 |
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)); |