Ticket Hash: | 777ae99cfbf6106de0d01eb5bd11f69e64919b53 | |||
Title: | variable lookup before a common creation affects behaviour of variable resolution | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Critical | Priority: | Immediate | |
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2019-11-04 21:28:30 | |||
Version Found In: | trunk [41ce4308a9] | |||
User Comments: | ||||
schmitzu added on 2019-11-04 13:25:29:
The following script: package require Itcl itcl::class A { private common l1 "" } itcl::class B { inherit A puts "info exists l1=[info exists l1]" private common l1 lappend l1 "one" puts "l1=$l1" } leads to this output/error: info exists l1=0 can't access "l1": private variable while executing "lappend l1 "one"" (class "B" body line 5) invoked from within "itcl::class B { inherit A puts "info exists l1=[info exists l1]" private common l1 lappend l1 "one" puts "l1=$l1" }" Previous versions (e.g. [05b48e2011]) doesn't have this problem. When commenting out the "info exists" line, no error is thrown. sebres added on 2019-11-04 17:09:17:
Confirmed. WiP. sebres added on 2019-11-04 21:28:30: Fixed in [8b790617eb], test-cases extended, etc. |