TUPLE type conformance to non-conformant types

[email protected] (Alexander Rios) Thu, 04 Aug 2005 17:34:34 -0400
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <[email protected]>
The following TESTER class does NOT conform to ANY.
I mean, it "inserts" class ANY.  It uses non-conforming inheritance.

Yet, its 'say_hello' procedure can be assigned to a PROCEDURE[ANY,TUPLE].

Since the class below does NOT conform to class ANY how can
say_hello be assigned to a PROCEDURE[ANY, TUPLE]???

The following code compiles and runs fine on the current beta.


class TESTER
insert
    ANY
    end
creation {ANY}
    execute
feature {NONE}
    execute is
        local
            f: PROCEDURE[ANY,TUPLE]
        do
            f := agent Current.say_hello
            f.call([])
        end

feature {ANY}
    say_hello is
        do
            print(once "Hello%N")
        end
end

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp