Files
swift-mirror/validation-test/Sema/rdar84879566.swift
Alejandro Alonso 2a2f70f944 Fix tests who aren't using %target-cpu (#59433)
don't import string processing
2022-06-14 20:39:03 -07:00

26 lines
560 B
Swift

// RUN: %target-swift-frontend -typecheck -target %target-cpu-apple-macosx10.15 -swift-version 5 %S/Inputs/rdar84879566_invalid_decls.swift -primary-file %s -verify
// REQUIRES: OS=macosx
protocol Tupled {
associatedtype TupleType
@TupleBuilder var tuple: TupleType { get }
}
@resultBuilder
struct TupleBuilder {
static func buildBlock() -> () {
return ()
}
static func buildBlock<T1>(_ t1: T1) -> (T1) {
return (t1)
}
}
struct MyApp: Tupled {
var tuple: some Any {
MyView() // expected-error {{ambiguous use of 'init()'}}
}
}