Loading ...
Sorry, an error occurred while loading the content.

Re: [eiffel_software] detachable and expanded types?

Expand Messages
  • Thomas Beale
    ... I can t do that in any meaningful way here, because only the B descendant of A is based on a generic concept (INTERVAL[G]). But I was thinking that a
    Message 1 of 5 , Sep 19, 2013
    • 0 Attachment
      On 19/09/2013 00:47, Emmanuel Stapf wrote:
      > This is related to basic expanded types and ANY. The compiler is not generating
      > the code that will transform the efficient representation of the INTEGER into a
      > full fledge object needed by `set_assumed_value' since its argument static type
      > declaration is ANY. We will look into this issue.
      >
      > The workaround is to make A generic and have a descendent where `prototype_value'
      > is ANY if you need that particular case.

      I can't do that in any meaningful way here, because only the B
      descendant of A is based on a generic concept (INTERVAL[G]). But I was
      thinking that a forced redefinition of prototype_value in C to be of
      type B [INTEGER] should make the compiler understand what concrete type
      it should be in instances of C.



      - thomas
    • Thomas Beale
      ... A finalise of this system produces the following error:
      Message 2 of 5 , Sep 19, 2013
      • 0 Attachment
        On 19/09/2013 10:00, Thomas Beale wrote:
        > On 19/09/2013 00:47, Emmanuel Stapf wrote:
        >> This is related to basic expanded types and ANY. The compiler is not generating
        >> the code that will transform the efficient representation of the INTEGER into a
        >> full fledge object needed by `set_assumed_value' since its argument static type
        >> declaration is ANY. We will look into this issue.
        >>
        >> The workaround is to make A generic and have a descendent where `prototype_value'
        >> is ANY if you need that particular case.
        > I can't do that in any meaningful way here, because only the B
        > descendant of A is based on a generic concept (INTERVAL[G]). But I was
        > thinking that a forced redefinition of prototype_value in C to be of
        > type B [INTEGER] should make the compiler understand what concrete type
        > it should be in instances of C.
        >

        A finalise of this system produces the following error:

        c:\project\openehr\adl-tools-c2o\apps\adl_workbench\app\eifgens\adl_workbench\f_code\c50\ca2474.c(7335)
        : error C2440: 'function' : cannot convert from 'volatile EIF_REAL_32'
        to 'EIF_REFERENCE'
        NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
        9.0\VC\Bin\cl.EXE"' : return code '0x2'
        Stop.

        I suspect that relates to this problem.

        - thomas
      • Emmanuel Stapf
        ... I was giving you a way to achieve that by introducing A_PRIME [G] which has the same code as A now except that property_value was generic and in B you
        Message 3 of 5 , Sep 19, 2013
        • 0 Attachment
          > > The workaround is to make A generic and have a descendent where
          > `prototype_value'
          > > is ANY if you need that particular case.
          >
          > I can't do that in any meaningful way here, because only the B descendant
          > of A is based on a generic concept (INTERVAL[G]). But I was thinking that
          > a forced redefinition of prototype_value in C to be of type B [INTEGER]
          > should make the compiler understand what concrete type it should be in
          > instances of C.

          I was giving you a way to achieve that by introducing A_PRIME [G] which has the
          same code as A now except that property_value was generic and in B you inherit
          from A_PRIME [G], not A, and A inherits from A_PRIME [ANY].

          Regards,
          Manu
        Your message has been successfully submitted and would be delivered to recipients shortly.