summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-02-09 12:30:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-02-09 12:30:32 (GMT)
commit88cc8c36e3373ff9265df0f3ff4cb0310104acf0 (patch)
tree48617b85dfb3e05e677e2aabaece819ec9fe1e3a /tests
parent98040fe8bcb5786e0e2743bc32dc10b576f86f93 (diff)
parentfbadf81dac9faf5906086942ecb64e4c644b3038 (diff)
downloadtcl-88cc8c36e3373ff9265df0f3ff4cb0310104acf0.zip
tcl-88cc8c36e3373ff9265df0f3ff4cb0310104acf0.tar.gz
tcl-88cc8c36e3373ff9265df0f3ff4cb0310104acf0.tar.bz2
[Bug 3603695]: Change the way that the [oo::object] 'varname' method is
implemented so that there are no longer problems with interactions due to the resolver. Thanks to Taylor Venable <tcvena@gmail.com> for identifying the problem.
Diffstat (limited to 'tests')
-rw-r--r--tests/oo.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test
index 5d34077..49fe150 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -2204,6 +2204,25 @@ test oo-19.2 {OO: varname method: Bug 2883857} -setup {
} -cleanup {
SpecialClass destroy
} -result ::oo_test::x(y)
+test oo-19.3 {OO: varname method and variable decl: Bug 3603695} -setup {
+ oo::class create testClass {
+ variable foo
+ export varname
+ constructor {} {
+ variable foo x
+ }
+ method bar {obj} {
+ my varname foo
+ $obj varname foo
+ }
+ }
+} -body {
+ testClass create A
+ testClass create B
+ lsearch [list [A varname foo] [B varname foo]] [B bar A]
+} -cleanup {
+ testClass destroy
+} -result 0
test oo-20.1 {OO: variable method} -body {
oo::class create testClass {