Last active
April 3, 2020 17:52
-
-
Save niw/3b1deb220b3615fa70d81b3d59119ce3 to your computer and use it in GitHub Desktop.
I found a SILOptimizer problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `swiftc -Osize main.swift` then crash. | |
// Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29). | |
struct S { | |
} | |
struct T { | |
let s: S | |
} | |
class C { | |
func method() -> Any { | |
let t = f() | |
let r = (t != nil) ? 1 : nil | |
return (r, t?.s) | |
} | |
func f() -> T? { | |
return T(s: S()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://bugs.swift.org/browse/SR-12495