mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Handle PlaceholderTypes in associated type inference
Avoid attempting to infer an associatedtype as a type that contains placeholders.
This commit is contained in:
@@ -117,6 +117,12 @@ private:
|
||||
#define SINGLETON_TYPE(SHORT_ID, ID) TRIVIAL_CASE(ID##Type)
|
||||
#include "swift/AST/TypeNodes.def"
|
||||
|
||||
bool visitPlaceholderType(CanPlaceholderType firstType, Type secondType,
|
||||
Type sugaredFirstType) {
|
||||
// Placeholder types never match.
|
||||
return mismatch(firstType.getPointer(), secondType, sugaredFirstType);
|
||||
}
|
||||
|
||||
bool visitUnresolvedType(CanUnresolvedType firstType, Type secondType,
|
||||
Type sugaredFirstType) {
|
||||
// Unresolved types never match.
|
||||
|
||||
Reference in New Issue
Block a user