PR# 19978 Conversion procedures: generic convert types with same base class

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2026/05/25
Class: Bug
Severity: Non-critical
Number: 19978
Release: 25.12.9.8922
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Conversion procedures: generic convert types with same base class

Description
The validity rule VYCP-4 does not allow two convert types from conversion procedures to have the same base class.
But EiffelStudio fails to report this validity rule.

In the example below class `BB [G]` declares two conversion procedures of the form `f ({CC [INTEGER]})` and `g ({CC [G]})`, but the two convert types have the same base class. This violates VYCP-4. Indeed, for the actual generic derivation `BB [INTEGER]` there is an ambiguity between `f` and `g`.

--
Eric Bezault
To Reproduce
class AA

create

	make

feature

	make
		local
			b: BB [INTEGER]
			c: CC [INTEGER]
		do
			create c
			b := c
		end

end
~~~~
class BB [G]

create

	f, g

convert

	f ({CC [INTEGER]}),
	g ({CC [G]})

feature

	f (a: CC [INTEGER])
		do
		end

	g (a: CC [G])
		do
		end

end
~~~~
class CC [G]

end
Problem Report Interactions