Skip to content

Commit 4a631ee

Browse files
committed
AST: It's not 'opaque' anymore
1 parent a067c9a commit 4a631ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,10 +2160,10 @@ NOTE(decl_import_via_here,none,
21602160

21612161
// Opaque return types
21622162
ERROR(opaque_type_invalid_constraint,none,
2163-
"an 'opaque' type must specify only 'Any', 'AnyObject', protocols, "
2163+
"a 'some' type must specify only 'Any', 'AnyObject', protocols, "
21642164
"and/or a base class", ())
21652165
NOTE(opaque_of_optional_rewrite,none,
2166-
"did you mean to write an optional of an 'opaque' type?", ())
2166+
"did you mean to write an optional of an 'some' type?", ())
21672167
ERROR(inferred_opaque_type,none,
21682168
"property definition has inferred type %0, involving the 'some' "
21692169
"return type of another declaration", (Type))

test/type/opaque.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ typealias Foo = some P // expected-error{{'some' types are only permitted}}
8585

8686
func blibble(blobble: some P) {}
8787
func blib() -> P & some Q { return 1 } // expected-error{{'some' should appear at the beginning}}
88-
func blab() -> some P? { return 1 } // expected-error{{must specify only}} expected-note{{did you mean to write an optional of an 'opaque' type?}}
88+
func blab() -> some P? { return 1 } // expected-error{{must specify only}} expected-note{{did you mean to write an optional of an 'some' type?}}
8989
func blorb<T: some P>(_: T) { } // expected-error{{'some' types are only permitted}}
9090
func blub<T>() -> T where T == some P { return 1 } // expected-error{{'some' types are only permitted}}
9191

0 commit comments

Comments
 (0)