Skip to content

Commit 90f3cd5

Browse files
committed
---
yaml --- r: 349597 b: refs/heads/master-next c: d0190a5 h: refs/heads/master i: 349595: e0da040
1 parent dd45d79 commit 90f3cd5

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 9eeb66154bdb5fb77d897aafacfb780c7cb0affd
3+
refs/heads/master-next: d0190a5f866054c1879fcc68b173cd6232b4dc65
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/AST/ASTScopeCreation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,7 @@ void PatternEntryDeclScope::beCurrent() {
17881788
unsigned varCount = 0;
17891789
getPatternEntry().getPattern()->forEachVariable(
17901790
[&](VarDecl *) { ++varCount; });
1791-
varCountWhenLastExpanded = 0;
1791+
varCountWhenLastExpanded = varCount;
17921792
}
17931793
bool PatternEntryDeclScope::isCurrent() const {
17941794
if (initWhenLastExpanded != getPatternEntry().getOriginalInit())

branches/master-next/lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,10 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
19241924
// with overloaded declarations.
19251925
if (last->getKind() == ConstraintLocator::ApplyArgToParam)
19261926
return getTypeMatchFailure(locator);
1927+
} else { // There are no elements in the path
1928+
auto *anchor = locator.getAnchor();
1929+
if (!(anchor && isa<AssignExpr>(anchor)))
1930+
return getTypeMatchFailure(locator);
19271931
}
19281932

19291933
auto *fix = MissingConformance::forContextual(
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: not %target-swift-frontend -typecheck %s
2+
3+
protocol Foo {}
4+
func foo(_ bar: Foo) {}
5+
foo(true ? "a" : "b")

0 commit comments

Comments
 (0)