diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-07-07 08:57:49 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-07-07 08:57:49 (GMT) |
| commit | d0f8889c8f63ea1c95b2d89ad98354657cf2f10f (patch) | |
| tree | 0997676565ebedd62e4e353301f0dd71a694f604 | |
| parent | 27110774bd87b00612e7c3ff97d7af542d364d42 (diff) | |
| download | tcl-d0f8889c8f63ea1c95b2d89ad98354657cf2f10f.zip tcl-d0f8889c8f63ea1c95b2d89ad98354657cf2f10f.tar.gz tcl-d0f8889c8f63ea1c95b2d89ad98354657cf2f10f.tar.bz2 | |
And another test
| -rw-r--r-- | tests/oo.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test index b2c269b..e49ecb3 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -4898,6 +4898,22 @@ test oo-41.2 {TIP 478: myclass command cleanup} -setup { } -cleanup { parent destroy } -result {{this is ::cls1} {this is ::x} {this is ::x} {this is ::cls1} 1 1} +test oo-41.3 {TIP 478: myclass command calls unexported methods, via forward} -setup { + oo::class create parent + set result {} +} -body { + oo::class create cls1 { + superclass parent + self method Hi {} { + return "this is [self]" + } + forward poke myclass Hi + } + cls1 create x + lappend result [catch {cls1 Hi}] [x poke] +} -cleanup { + parent destroy +} -result {1 {this is ::cls1}} cleanupTests return |
