Skip to content

Commit a728b52

Browse files
committed
cleanup and remove the new tests that fail at the moment
1 parent 0df8c63 commit a728b52

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

lib/SILGen/SILGenDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,10 +1011,10 @@ class LetValueInitialization : public Initialization {
10111011
"called LetValueInit::finishInitialization twice!");
10121012

10131013
if (!address) {
1014-
// We should have already in the non-address case.
1014+
// We should have already registered in the non-address case.
10151015
assert(SGF.VarLocs.count(vd) && "Didn't bind a value to this let!");
10161016
} else {
1017-
// We delayed the emission to catch forward declaration uses.
1017+
// We should have delayed the emission to catch forward declaration uses.
10181018
assert(SGF.VarLocs.count(vd) == 0 && "Should not have emitted the address-only let!");
10191019
SGF.VarLocs[vd] = SILGenFunction::VarLoc(address,
10201020
SILAccessEnforcement::Unknown);

test/SILOptimizer/definite_init_address_only_let.swift

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,3 @@ func quz<T>(a: Bool, t: T) {
3939
return
4040
}
4141
}
42-
43-
// https://github.com/swiftlang/swift/issues/84909
44-
45-
func uninit_closure_reference() {
46-
func passthrough(_ a: () -> Any) -> Any { a() }
47-
48-
let initMe = passthrough { initMe }
49-
// expected-error @-1 {{constant 'initMe' used before being initialized}}
50-
// expected-note @-2 {{defined here}}
51-
52-
let inline = { () -> Any in inline }()
53-
// expected-error @-1 {{constant 'inline' used before being initialized}}
54-
// expected-note @-2 {{defined here}}
55-
56-
// these should not regress
57-
func castAny(_ a: Any) {
58-
let directUncond = a as! Int
59-
_ = directUncond
60-
61-
let directCond = a as? Int
62-
_ = directCond
63-
64-
let twoPhaseUncond: Int
65-
twoPhaseUncond = a as! Int
66-
_ = twoPhaseUncond
67-
68-
let twoPhasCond: Int?
69-
twoPhasCond = a as? Int
70-
_ = twoPhasCond
71-
}
72-
}

0 commit comments

Comments
 (0)