11// RUN: %empty-directory(%t)
2- // RUN: %target-swift-frontend -typecheck -module-name FunctionBuilders -emit-module-interface-path %t/FunctionBuilders .swiftinterface %s
3- // RUN: %FileCheck %s < %t/FunctionBuilders .swiftinterface
2+ // RUN: %target-swift-frontend -typecheck -module-name ResultBuilders -emit-module-interface-path %t/ResultBuilders .swiftinterface %s
3+ // RUN: %FileCheck %s < %t/ResultBuilders .swiftinterface
44// RUN: %target-swift-frontend -I %t -typecheck -verify %S/Inputs/result_builders_client.swift
5- // RUN: %target-swift-frontend -compile-module-from-interface %t/FunctionBuilders.swiftinterface -o %t/FunctionBuilders.swiftmodule
5+ // RUN: %target-swift-frontend -compile-module-from-interface %t/ResultBuilders.swiftinterface -o %t/ResultBuilders.swiftmodule
6+ // RUN: %FileCheck %s < %t/ResultBuilders.swiftinterface
67
8+ // CHECK: @_functionBuilder public struct TupleBuilder
79@resultBuilder
810public struct TupleBuilder {
911 public static func buildBlock< T1, T2> ( _ t1: T1 , _ t2: T2 ) -> ( T1 , T2 ) {
@@ -38,7 +40,7 @@ public struct TupleBuilder {
3840 public static func buildIf< T> ( _ value: T ? ) -> T ? { return value }
3941}
4042
41- // CHECK-LABEL: public func tuplify<T>(_ cond: Swift.Bool, @FunctionBuilders .TupleBuilder body: (Swift.Bool) -> T)
43+ // CHECK-LABEL: public func tuplify<T>(_ cond: Swift.Bool, @ResultBuilders .TupleBuilder body: (Swift.Bool) -> T)
4244public func tuplify< T> ( _ cond: Bool , @TupleBuilder body: ( Bool ) -> T ) {
4345 print ( body ( cond) )
4446}
@@ -52,13 +54,13 @@ public struct UsesBuilderProperty {
5254 " goodbye "
5355 }
5456
55- // CHECK: public func myFunc(@FunctionBuilders .TupleBuilder fn: () -> ())
57+ // CHECK: public func myFunc(@ResultBuilders .TupleBuilder fn: () -> ())
5658 public func myFunc( @TupleBuilder fn: ( ) -> ( ) ) { }
5759}
5860
5961public protocol ProtocolWithBuilderProperty {
6062 associatedtype Assoc
61-
62- // CHECK: @FunctionBuilders .TupleBuilder var myVar: Self.Assoc { get }
63+
64+ // CHECK: @ResultBuilders .TupleBuilder var myVar: Self.Assoc { get }
6365 @TupleBuilder var myVar : Assoc { get }
6466}
0 commit comments