Interfacing the Debugger: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Seilerm (talk | contribs)
No edit summary
Seilerm (talk | contribs)
No edit summary
Line 40: Line 40:
end
end
</code>
</code>
In the case where G is actual type parameter is a subtype of STRING to two types are conform again.
In the case where G's actual type parameter is a subtype of STRING the two types are conform again.


The intresting rule is again '''VYCQ(3)''':
The interesting rule is again '''VYCQ(3)''':


  Is A[ANY] conform to A[STRING]?
  Is A[ANY] conform to A[STRING]?


This question is answered with '''no''' too. Therefore the conversion is valid.
This question is answered with '''no''' too. Therefore the conversion is valid.

Revision as of 03:21, 19 January 2007

Warning: Warning: Article under development

Introduction

This article discusses issues recently discovered for the following two validity rules:

8.15.7 Validity: Conversion Procedure rule, Validity code: VYCP
8.15.8 Validity: Conversion Query rule, Validity code: VYCQ

Examples

For the following examples eweasel tests have been created. Their named

Example 1

eweasel test: convert-to-current-type

class A[G]
convert
   to_a: {A[G]}
feature
   to_a: A[G]
end

The conversion to A[G] should indeed not be valid because they are conform.

The only rule that matters in our case is VYCQ(3).

What VYCQ(3) asks is the following

Is A[ANY] conform to A[G]?

As we answer this question clearly with no, the conversion is valid because all the other rules do not object either.

Example 2

eweasel test: convert-to-current-type

class A[G]
convert
   to_a: {A[STRING]}
feature
   to_a: A[STRING]
end

In the case where G's actual type parameter is a subtype of STRING the two types are conform again.

The interesting rule is again VYCQ(3):

Is A[ANY] conform to A[STRING]?

This question is answered with no too. Therefore the conversion is valid.