mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
211 B
Swift
13 lines
211 B
Swift
// RUN: %target-swift-frontend %s -O -emit-sil
|
|
|
|
// Make sure we are not crashing on this one.
|
|
|
|
class X { func ping() {} }
|
|
class Y : X { override func ping() {} }
|
|
|
|
func foo(y : Y) {
|
|
var x : X = y
|
|
x.ping()
|
|
}
|
|
|