lambda-list: add check for the proper context (function)
authorDaniel Kochmański <daniel@turtleware.eu>
Mon, 17 Aug 2015 12:08:22 +0000 (14:08 +0200)
committerDaniel Kochmański <daniel@turtleware.eu>
Mon, 17 Aug 2015 12:12:46 +0000 (14:12 +0200)
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
src/c/compiler.d

index 9fd80be..b601e14 100644 (file)
@@ -2808,7 +2808,8 @@ REST:           unlikely_if (stage >= AT_REST)
         case AT_REQUIREDS:
                 nreq++;
                 assert_var_name(v);
-                if (ecl_member_eq(v, lists[0]))
+                if (context == @'function' && ecl_member_eq(v, lists[0]))
+                        /* note: ftype isn't valid context for this check */
                         FEprogram_error_noreturn
                                 ("The variable ~s occurs more than once as the "
                                  "required parameter in the lambda list.", 1, v);