Constraint genericity and REAL_GENERAL

Christophe HARO <[email protected]> Tue, 3 Aug 2010 06:47:19 +0200 (CEST)
Newsgroups gmane.comp.lang.eiffel.smalleiffel
Message-ID <8422016.803971280810839840.JavaMail.root@spooler4-g27.priv.proxad.net>
Bonjour,

I do not understand why it is not legal to declare :

    expanded class MY_CLASS[T -> REAL_GENERAL]

but it is legal to write :

    expanded class MY_CLASS[T -> NUMERIC]

and I do not understand the message : << Actually this is only a compiler implementation facility. >> that the compiler outputs in the first case :

compile -debug test_math_macros_real.e -o test_math_macros_real.exe
****** Fatal Error: The REAL_GENERAL type cannot be used here.
Actually this is only a compiler implementation facility.

Line 17 column 22 in MATH_MACROS (/Users/haro/livres-eni/poo/heritage/programmes/figures/math-macros/math_macros.e):
    MATH_MACROS[T -> REAL_GENERAL]
                     ^            
------
Error occurs while compiling. Compilation process aborted.

Can someone help me to understand ?

Thanks in advance.

Regards,

-- 
Christophe HARO
[email protected]
----------------------------