summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse.c b/parse.c
index 5631bc2..b7bab5b 100644
--- a/parse.c
+++ b/parse.c
@@ -450,16 +450,16 @@ parserefl(int arg)
 		if (curi - insb >= NIns)
 			err("too many instructions (1)");
 		env = peek() == Tenv;
-		if (env)
+		if (env) {
 			next();
-		k = parsecls(&ty);
+			k = Kl;
+		} else
+			k = parsecls(&ty);
 		r = parseref();
 		if (req(r, R))
 			err("invalid argument");
 		if (hasenv && env)
 			err("only one environment allowed");
-		if (env && k != Kl)
-			err("environment must be of type l");
 		if (!arg && rtype(r) != RTmp)
 			err("invalid function parameter");
 		if (k == 4)