mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
23 lines
346 B
Swift
23 lines
346 B
Swift
// RUN: %swift -i %s | FileCheck %s
|
|
|
|
class C {
|
|
constructor() {}
|
|
|
|
destructor {
|
|
println("boom! roasted")
|
|
}
|
|
}
|
|
|
|
class D : C {
|
|
destructor {
|
|
println("i can't decide between a fat joke and a dumb joke")
|
|
}
|
|
}
|
|
|
|
C()
|
|
// CHECK: boom! roasted
|
|
D()
|
|
// CHECK-NEXT: i can't decide between a fat joke and a dumb joke
|
|
// CHECK-NEXT: boom! roasted
|
|
|