PR# 19979 Conversion procedures: formal generic parameter convert type

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2026/05/25
Class: Bug
Severity: Non-critical
Number: 19979
Release: 25.12.9.8922
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Conversion procedures: formal generic parameter convert type

Description
The compiler should forbid the case where the convert type of a conversion procedure is a formal generic parameter.

For example in the example below, class `BB` declares a conversion procedure of the form `f ({G})` where `G` is a formal generic parameter. But for the actual generic derivation `BB [CC]` we end up with an ambiguous behavior with `CC` which both conforms and converts to `BB [CC]`.

--
Eric Bezault
To Reproduce
class AA

create

	make

feature

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

end
~~~~
class BB [G -> ANY]

create

	f

convert

	f ({G})

feature

	f (a: G)
		do
		end

end
~~~~
class CC

inherit

	BB [CC]

end
Problem Report Interactions