mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
No update is needed for the values they produce. This pass should really be refactored not to crash on instructions that aren't explicitly listed or at least not to compile if not every instruction is listed. rdar://155059418
22 lines
418 B
Swift
22 lines
418 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
// RUN: %target-swift-frontend %t/Library.swift -sil-verify-all -emit-sil -import-objc-header %t/Header.h > /dev/null
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
//--- Header.h
|
|
|
|
@import Foundation;
|
|
|
|
@interface Foo : NSObject
|
|
@property (nonatomic, readwrite) NSUInteger length;
|
|
@end
|
|
|
|
//--- Library.swift
|
|
|
|
func foo(_ x: borrowing Foo) -> UInt {
|
|
let y = x.length
|
|
return y
|
|
}
|
|
|