oo::class create Fred {
    method test1 {} {
	puts stderr test1
    }

    method test2 {args} {
	puts stderr test2
    }

    method test3 {} {
	puts stderr test2
    }

    method test4 {} {
	tailcall coroutine X4 apply {{} {puts stderr moop; ::yield}}
    }

    method test5 {} {
	tailcall coroutine X5 apply {{} {puts stderr moop; ::yield}}
    }
}

oo::class create Pebbles {
    method test1 {} {
	next
    }

    method test2 {} {
	tailcall next moop
    }

    method test3 {} {
	tailcall next
    }

    method test4 {} {
	next
    }

    method test5 {} {
	tailcall next
    }

    superclass Fred
}

Pebbles create pebbles
pebbles test1
pebbles test4
pebbles test5
pebbles test3
pebbles test2
