mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
23 lines
498 B
Swift
23 lines
498 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %build-clang-importer-objc-overlays
|
|
|
|
// RUN: %target-swift-frontend %clang-importer-sdk-nosource -I %t %s -emit-ir
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: objc_interop
|
|
|
|
// Test that we don't crash when producing IR.
|
|
|
|
import AppKit
|
|
class MyView: NSView {
|
|
func drawRect() {
|
|
var x = self.superview
|
|
var l = self.layer
|
|
self.layer = CALayer()
|
|
self.nextKeyView = nil
|
|
subviews = []
|
|
}
|
|
}
|
|
var m = MyView()
|
|
m.drawRect()
|