Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Q: ARRAY[expand...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 805 of 930
Post > Topic >>

Q: ARRAY[expanded_type] conforms to ARRAY[ANY]?

by Ulrich Windl <Ulrich.Windl@[EMAIL PROTECTED] > Jul 11, 2006 at 08:05 AM

Hi,

a system that compiled fine with the snapshot of v5.7 failed to compile on
v5.6 with the following message:

Error code: VTCG
Error: actual generic parameter does not conform to constraint.
What to do: make sure that actual parameter is a type conforming to the
  constraint (the type appearing after `->' for the corresponding formal).

Class: TEST
Feature: invariant
In declaration: ARRAY [EXPANDED_TYPE]

For type: ARRAY [EXPANDED_TYPE]
Argument number: 1:
Actual generic parameter: EXPANDED_TYPE
Type to which it should conform: ANY

-------------------------------------------------------------------------------Degree:
4 Processed: 2 To go: 0 Total: 2

Now I'm wondering: am I wrong, or the compiler?

Source is:
indexing
        description     : "Test for VTCG"

class
        TEST

create
        test

feature -- Initialization

        test is
                        -- Creation procedure.
                do
                        --| Add your code here
                end

feature -- Test

        a : ARRAY[EXPANDED_TYPE]

invariant
        test: a /= Void

end -- class TEST

indexing
        description: "Test"

expanded class
        EXPANDED_TYPE

feature -- Test

        item : BIT 3

end -- class EXPANDED_TYPE

system
        VTCG_test

root
        TEST: "test"

default
        assertion (require)
        multithreaded (no)
        console_application (no)
        dynamic_runtime (no)
        dead_code_removal (yes)
        profile (no)
        line_generation (no)
        array_optimization (no)
        inlining (no)
        inlining_size ("10")


cluster

        test: "."

                -- EiffelBase
        library base:                           "$ISE_EIFFEL/library/base"
                exclude
                        "table_eiffel3";"desc"
                end
end

Regards,
Ulrich
P.S. Also posted as issue 10568 at eiffel.com
 




 3 Posts in Topic:
Q: ARRAY[expanded_type] conforms to ARRAY[ANY]?
Ulrich Windl <Ulrich.W  2006-07-11 08:05:36 
Re: Q: ARRAY[expanded_type] conforms to ARRAY[ANY]?
peter_gummer@[EMAIL PROTE  2006-07-11 16:11:38 
Re: Q: ARRAY[expanded_type] conforms to ARRAY[ANY]?
Ulrich Windl <Ulrich.W  2006-07-12 09:35:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 16:46:02 CDT 2008.