mirror of
https://github.com/apple/swift.git
synced 2026-03-04 18:24:35 +01:00
31 lines
261 B
Swift
31 lines
261 B
Swift
var x: UInt = 0
|
|
|
|
func level1() {
|
|
level2()
|
|
}
|
|
|
|
func level2() {
|
|
level3()
|
|
}
|
|
|
|
func level3() {
|
|
level4()
|
|
}
|
|
|
|
func level4() {
|
|
level5()
|
|
}
|
|
|
|
func level5() {
|
|
print("About to overflow")
|
|
|
|
x -= 1
|
|
}
|
|
|
|
@main
|
|
struct Overflow {
|
|
static func main() {
|
|
level1()
|
|
}
|
|
}
|