Skip to content

Commit 0e8fca6

Browse files
committed
save snapshot of wtf i'm doing
1 parent b13843b commit 0e8fca6

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,8 @@ TypeVariableType *ConstraintSystem::openGenericParameter(
18061806

18071807
// When move-only types are available, add a constraint to force generic
18081808
// parameters to conform to a "Copyable" protocol.
1809-
if (getASTContext().LangOpts.hasFeature(Feature::MoveOnly)) {
1809+
// if (getASTContext().LangOpts.hasFeature(Feature::MoveOnly)) {
1810+
if (true) {
18101811
ProtocolDecl *copyable = TypeChecker::getProtocol(
18111812
getASTContext(), SourceLoc(), KnownProtocolKind::Copyable);
18121813

test/Constraints/construction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ acceptString("\(hello), \(world) #\(i)!")
5959
Optional<Int>(1) // expected-warning{{unused}}
6060
Optional(1) // expected-warning{{unused}}
6161
_ = .none as Optional<Int>
62-
Optional(.none) // expected-error {{cannot infer contextual base in reference to member 'none'}}
62+
Optional(.none) // expected-error {{type '_Copyable' has no member 'none'}}
6363

6464
// Interpolation
6565
_ = "\(hello), \(world) #\(i)!"

test/Constraints/generics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ func rdar79757320() {
933933
}
934934

935935
// FIXME: There has to be a way to propagate holes that makes it easy to suppress failures caused by missing members.
936-
_ = Container(value: Value(42).formatted(.S(a: .a, b: .b(0)))) // expected-error {{type 'R_79757320' has no member 'S'}}
936+
_ = Container(value: Value(42).formatted(.S(a: .a, b: .b(0)))) // expected-error {{reference to member 'S' cannot be resolved without a contextual type}}
937937
// expected-error@-1 {{cannot infer contextual base in reference to member 'a'}}
938938
// expected-error@-2 {{cannot infer contextual base in reference to member 'b'}}
939939
}

test/Constraints/members.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ func rdar66891544() {
737737
func foo<T>(_: T, defaultT: T? = nil) {}
738738
func foo<U>(_: U, defaultU: U? = nil) {}
739739

740-
foo(.bar) // expected-error {{cannot infer contextual base in reference to member 'bar'}}
740+
foo(.bar) // expected-error {{type '_Copyable' has no member 'bar'}}
741741
}
742742

743743
// rdar://55369704 - extraneous diagnostics produced in combination with missing/misspelled members

0 commit comments

Comments
 (0)