File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -97,11 +97,6 @@ extension Bar {
97
97
}
98
98
}
99
99
100
- protocol P { }
101
- struct ConformsToP : P { }
102
-
103
- func somePlaceholder( ) -> some _ { ConformsToP ( ) } // expected-error {{placeholder type not allowed here}}
104
-
105
100
// FIXME: We should probably have better diagnostics for these situations--the user probably meant to use implicit member syntax
106
101
let _: Int = _ ( ) // expected-error {{type of expression is ambiguous without more context}}
107
102
let _: ( ) -> Int = { _ ( ) } // expected-error {{unable to infer closure type in the current context}}
Original file line number Diff line number Diff line change @@ -518,3 +518,6 @@ func takesOpaqueProtocol<T : OpaqueProtocol>(generic: T) {
518
518
_ = generic. getAsSome ( )
519
519
_ = generic [ 0 ]
520
520
}
521
+
522
+ func opaquePlaceholderFunc( ) -> some _ { 1 } // expected-error {{placeholder type not allowed here}}
523
+ var opaquePlaceholderVar : some _ = 1 // expected-error {{placeholder type not allowed here}}
You can’t perform that action at this time.
0 commit comments