Open
Description
Description
No response
Reproduction
func foo<T>(_: T, _: T) -> [T] {}
func test() {
let int: Int
let int16: Int16
for _ in foo(int16, int) {}
}
error: conflicting arguments to generic parameter 'Self' ('[Int16]' vs. '[Int]') [conflicting_arguments_for_generic_parameter]
for _ in foo(int16, int) {}
^
error: conflicting arguments to generic parameter 'T' ('Int16' vs. 'Int') [conflicting_arguments_for_generic_parameter]
for _ in foo(int16, int) {}
^
error: conflicting arguments to generic parameter 'Elements' ('[Int16]' vs. '[Int]') [conflicting_arguments_for_generic_parameter]
for _ in foo(int16, int) {}
^
Expected behavior
A single error in relation to written code: conflicting arguments to generic parameter 'T' ('Int16' vs. 'Int')
.
Environment
Swift version 6.0-dev (LLVM 48dc0c6fa01ce9e, Swift 2650c285671c227)
Additional information
No response