// RUN: %target-typecheck-verify-swift // https://github.com/apple/swift/issues/55623 // Make sure we don't incorrectly split the constraint system without // considering that a result builder type var may connect the inside of a // closure body with the enclosing expression. struct New { init(value: Value, @ScopeBuilder scope: () -> Component) { } } struct Component {} struct Map { let transform: (Value) -> Transformed } @resultBuilder struct ScopeBuilder { static func buildExpression(_ map: Map) -> Component { Component() } static func buildBlock(_ components: Component...) -> Component { Component() } } let new1 = New(value: 42) { Map { $0.description } } let new2 = New(value: 42) { Map { $0.description } }