Skip to content

Commit ddd4842

Browse files
committed
[Sema] Allocate locator for HandlePlaceholderType
1 parent 1819d33 commit ddd4842

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5026,12 +5026,14 @@ class OpenUnboundGenericType {
50265026

50275027
class HandlePlaceholderType {
50285028
ConstraintSystem &cs;
5029-
const ConstraintLocatorBuilder &locator;
5029+
ConstraintLocator *locator;
50305030

50315031
public:
50325032
explicit HandlePlaceholderType(ConstraintSystem &cs,
50335033
const ConstraintLocatorBuilder &locator)
5034-
: cs(cs), locator(locator) {}
5034+
: cs(cs) {
5035+
this->locator = cs.getConstraintLocator(locator);
5036+
}
50355037

50365038
Type operator()(PlaceholderTypeRepr *placeholderRepr) const {
50375039
return cs.createTypeVariable(

0 commit comments

Comments
 (0)