From 919d4826a0ea00a571ccce1dc7f45a7c0f59d2f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sat, 8 Jun 2013 13:09:21 +0200
Subject: [PATCH] Compiler: Fixed bug in handling of local::.

---
 src/language.yacc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/language.yacc b/src/language.yacc
index d72057f370..21628c4692 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -3876,7 +3876,7 @@ idents2: idents
 	$$ = 0;
       }
       else {
-	if (!(ref->id_flags & ID_HIDDEN)) {
+	if (!(ref->id_flags & ID_LOCAL)) {
 	  /* We need to generate a new reference. */
 	  int d;
 	  struct reference funp = *ref;
@@ -3886,9 +3886,10 @@ idents2: idents
 	    struct reference *refp;
 	    refp = Pike_compiler->new_program->identifier_references + d;
 
+	    if (!(refp->id_flags & ID_LOCAL)) continue;
+
 	    if((refp->inherit_offset == funp.inherit_offset) &&
-	       (refp->identifier_offset == funp.identifier_offset) &&
-	       ((refp->id_flags | ID_USED) == (funp.id_flags | ID_USED))) {
+	       (refp->identifier_offset == funp.identifier_offset)) {
 	      i = d;
 	      break;
 	    }
-- 
GitLab