Open
Description
Description
If a generic takes multiple Int parameter, all values will correspond to the first value
Reproduction
struct Point2D<let x: Int, let y: Int> {}
extension Point2D : CustomStringConvertible {
var description: String {
get {
"\(x) \(y)"
}
}
}
let p2d = Point2D< 1, 10>()
print("\(p2d)")
struct Point3D<let x: Int, let y: Int, let z: Int> {}
extension Point3D : CustomStringConvertible {
var description: String {
get {
"\(x) \(y) \(z)"
}
}
}
let p3d = Point3D< 1, 10, 200>()
print("\(p3d)")
Expected behavior
Each generic parameter should have its own value
Environment
Swift version 6.2-dev (LLVM 4197ac1672a278c, Swift acbdfef)
Target: x86_64-unknown-linux-gnu
Build config: +assertions
Additional information
No response