Files
swift-mirror/test/SILOptimizer/dead_func_objc_extension_keypath.swift
Graydon Hoare 3ef686bf92 [DeadFunctionElimination] Pass on keypaths to foreign DeclRef properties.
These show up specifically when someone forms a keypath to an ObjC
property in a category. They're no-ops from the perspective of
DFE but the code has to intentionally skip the case if it wants to
avoid the subsequent llvm_unreachable.

rdar://34913689
2017-10-25 23:21:56 -07:00

8 lines
211 B
Swift

// RUN: %target-swift-frontend %s -O -emit-sil -import-objc-header %S/Inputs/keypaths_objc.h
// REQUIRES: objc_interop
import Foundation
public func test_nocrash_rdar34913689() {
_ = \ObjCFoo.objcExtraProp
}