Multi-constraint formal generics: calls on formal generic in watch expressions

References
ECMA Eiffel section:
8.12 Genericity
Purpose:

Ensure that watch expressions that involve calls to features on entities of multi-constraint formal generic types are handled correctly.

Test procedure:
  1. Create and compile a system with the following classes:
    class A [G -> {
            B
                rename
                    f as b_f,
                    g as h,
                    out as b_out
                end,
            C
                rename
                    default_create as c_default_create,
                    f as c_f,
                    h as g,
                    out as c_out
                end
            } create default_create end
        ]
        feature
            f is
                do
                    create item
                end
            item: G
        end
        class B
        inherit
            ANY
                redefine
                    out
                end
        feature
            f, g, out: STRING is
                do
                    Result := "B"
                end
        end
        class C
        inherit
            ANY
                redefine
                    out
                end
        feature
            f, h, out: STRING is
                do
                    Result := "C"
                end
        end
        class D
        inherit
            B
                rename
                    f as b_f
                select
                    out
                end
            C
                rename
                    f as c_f,
                    out as c_out
                end
        end
        class TEST
        create
            make
        feature
            make is
                local
                    a: A [D]
                do
                    create a
                    a.f
                end
        end
    where TEST is the root class of the system.
  2. Run the system under debugger and stop in feature {A}.f after creation instruction.
  3. Add the following Watch expressions:
    item.b_out
    item.c_out
    item.b_f
    item.c_f
    item.g
    item.h
  4. Observe that the output matches the expected result:
    B
    B
    B
    C
    C
    B
Expected result:

Verify that the output matches the expected result.

Test runs

IDDatePlatformResult
trr#2891 year 12 weeks agoAll platformsFailed