Reattachment to non-conforming heir is reported at compile time
Posted November 8th, 2007 by ted_eiffel
in
Purpose:
Test reattachment to non-conforming heir should be reported at compile time as errors.
Test procedure:
Compile attached project.
Expected result:
Error code: VUAR(2)
Type error: non-conforming actual argument in feature call.
What to do: make sure that type of actual argument conforms to type
of corresponding formal argument.
Class: APPLICATION
Feature: make
Called feature: do_with_p1 (p1: P1) from APPLICATION
Argument name: p1
Argument position: 1
Actual argument type: A
Formal argument type: P1
Line: 16
a.from_p1
-> do_with_p1 (a)
l_p1 := a
Error code: VJAR
Type error: source of assignment does not conform to target.
What to do: make sure that type of source (right-hand side)
conforms (in the sense of inheritance rule) to type of target.
Class: APPLICATION
Feature: make
Target name: l_p1
Target type: P1
Source type: A
Line: 17
do_with_p1 (a)
-> l_p1 := a
end
Type error: non-conforming actual argument in feature call.
What to do: make sure that type of actual argument conforms to type
of corresponding formal argument.
Class: APPLICATION
Feature: make
Called feature: do_with_p1 (p1: P1) from APPLICATION
Argument name: p1
Argument position: 1
Actual argument type: A
Formal argument type: P1
Line: 16
a.from_p1
-> do_with_p1 (a)
l_p1 := a
Error code: VJAR
Type error: source of assignment does not conform to target.
What to do: make sure that type of source (right-hand side)
conforms (in the sense of inheritance rule) to type of target.
Class: APPLICATION
Feature: make
Target name: l_p1
Target type: P1
Source type: A
Line: 17
do_with_p1 (a)
-> l_p1 := a
end
| Attachment | Size |
|---|---|
| nc6.zip | 1.09 KB |
- Login or register to post comments
- Add new test run report
Test runs
| ID | Date | Platform | Result |
|---|---|---|---|
| trr#345 | 41 weeks 2 hours ago | Windows 32bit | Passed |