// RUN: %target-swift-frontend %s -emit-ir // rdar://problem/48223824 // https://github.com/apple/swift/issues/52357 // Compiler rejects well-formed code that triggered a fallback diagnostic due // to a bad substitution struct GenericThing { init (closure: (String)->()) { } } struct ThingHolder { func acceptThing (thingGenerator: ()->GenericThing) { } } struct A { } func demo (thingHolder: ThingHolder) { typealias Thing = GenericThing thingHolder.acceptThing { Thing { string in } } }