Skip to content

Commit 8f57c3b

Browse files
authored
---
yaml --- r: 343771 b: refs/heads/master-rebranch c: a68aa78 h: refs/heads/master i: 343769: 62e92dd 343767: 5c3b0e5
1 parent 3838449 commit 8f57c3b

File tree

5 files changed

+55
-2
lines changed

5 files changed

+55
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: 4189b6c99b0279f927b2391cdc4ed3c9906ee61f
1458+
refs/heads/master-rebranch: a68aa78fa1ae385c89908b346428bda5408edc68
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/lib/Sema/CSApply.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7577,7 +7577,8 @@ bool ConstraintSystem::applySolutionFixes(Expr *E, const Solution &solution) {
75777577
auto *transformedExpr = result->second.second;
75787578
// Since this closure has been transformed into something
75797579
// else let's look inside transformed expression instead.
7580-
return {true, transformedExpr};
7580+
transformedExpr->walk(*this);
7581+
return {false, E};
75817582
}
75827583
}
75837584

branches/master-rebranch/test/Constraints/function_builder_diags.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,18 @@ struct SR11440 {
199199
})
200200
}
201201
}
202+
203+
func acceptInt(_: Int, _: () -> Void) { }
204+
205+
// SR-11350 crash due to improper recontextualization.
206+
func erroneousSR11350(x: Int) {
207+
tuplify(true) { b in
208+
17
209+
x + 25
210+
Optional(tuplify(false) { b in
211+
if b {
212+
acceptInt(0) { }
213+
}
214+
}).domap(0) // expected-error{{value of type 'Optional<()>' has no member 'domap'}}
215+
}
216+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#import <Foundation/Foundation.h>
2+
3+
4+
// NB: No NS_ASSUME_NONNULL
5+
6+
@protocol FooProtocol <NSObject>
7+
8+
@property (nonatomic,readonly) NSString *name;
9+
10+
@end
11+
12+
13+
@interface ParentClass : NSObject
14+
15+
- (instancetype)initWithFoo:(id<FooProtocol>)foo;
16+
17+
@end
18+
19+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SR-8789
2+
3+
// RUN: %target-swift-emit-silgen -verify -import-objc-header %S/Inputs/objc_init_iuo_override.h %s
4+
// REQUIRES: objc_interop
5+
6+
class ChildClass: ParentClass {}
7+
8+
class GrandchildClass: ChildClass {
9+
// The original init is defined in objc as:
10+
// - (instancetype)initWithFoo:(id<FooProtocol>)foo;
11+
// without nullability audits, meaning the signature in Swift is:
12+
// init!(foo: FooProtocol)
13+
// and
14+
override init(foo: FooProtocol) {
15+
super.init(foo: foo)
16+
}
17+
}
18+

0 commit comments

Comments
 (0)