ref: 83eef0360e0c66ff50d2874e1829470101e2afab
parent: 1af62a6b4e9e10444098c57f64b1ad1b9cb03b95
author: Ori Bernstein <[email protected]>
date: Tue Nov 28 07:31:29 EST 2017
Remove impossible checks. None of the removed variants on syntax trees should be possible in a working compiler.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1387,14 +1387,8 @@
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));