Minor bug in type inference

Found a minor bug in type inference:

struct Bar {
    let val: Double
}

struct Foo {
    let bar: [Bar]
}

let p1 = Foo(bar: [.init(val: 0*0)]) // Cannot convert value of type 'Int' to expected argument type 'Double'
let p2 = Foo(bar: [Bar(val: 0*0)]) // OK

1 Like

At first glance this looks like it should work, but I'm not an expert in this area. Do you mind filing a bug at bugs.swift.org?