Support the use of members of protocol extensions on existential types.

To use members of protocol extensions on existential types, we
introduce an OpenExistentialExpr expression to open up the existential
type (into a local archetype) and perform the operations on that local
archetype.

Unlike with uses of initializers or dynamic-Self-producing
methods of protocols, which produce similar ASTs, we have the type
checker perform the "open" operation and then track it through
constraint application. This scheme is better (because it's more
direct), but it's still using a simplistic approach to deciding where
the actual OpenExistentialExpr goes that needs improvement.

Swift SVN r26964
This commit is contained in:
Doug Gregor
2015-04-04 00:00:14 +00:00
parent 192da7e0bf
commit f4d98da668
10 changed files with 335 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ int UUID::compare(UUID y) const {
return uuid_compare(Value, y.Value);
}
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &os, UUID uuid) {
llvm::raw_ostream &swift::operator<<(llvm::raw_ostream &os, UUID uuid) {
llvm::SmallString<UUID::StringBufferSize> buf;
uuid.toString(buf);
os << buf;