﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
204	Conversion cost ignores type parameters	f37yu		"The conversionCost function incorrectly produces a cost of zero between parametric types.

with declaration

{{{
forall (dtype DT)
struct A;
A(int) aint;
}}}

the invalid cast

{{{
(A(char)) aint
}}}

is accepted by the compiler.

There is an algorithmic error in conversionCost: struct types are already handled in typesCompatible call, which correctly considers type parameters. However, incompatible structs are passed into ConversionCost pass again which only consider names and not parameters.



"	defect	closed	major	cfa-cc	1.0	fixed		
