File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
lib/SILOptimizer/Mandatory
validation-test/SILOptimizer Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ struct SILMoveOnlyWrappedTypeEliminatorVisitor
241
241
NO_UPDATE_NEEDED (ExistentialMetatype)
242
242
NO_UPDATE_NEEDED (Builtin)
243
243
NO_UPDATE_NEEDED (IgnoredUse)
244
+ NO_UPDATE_NEEDED (ObjCMethod)
244
245
#undef NO_UPDATE_NEEDED
245
246
246
247
bool eliminateIdentityCast (SingleValueInstruction *svi) {
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: split-file %s %t
3
+ // RUN: %target-swift-frontend %t/Library.swift -sil-verify-all -emit-sil -import-objc-header %t/Header.h > /dev/null
4
+
5
+ // REQUIRES: objc_interop
6
+
7
+ //--- Header.h
8
+
9
+ @import Foundation;
10
+
11
+ @interface Foo : NSObject
12
+ @property ( nonatomic, readwrite) NSUInteger length;
13
+ @end
14
+
15
+ //--- Library.swift
16
+
17
+ func foo( _ x: borrowing Foo ) -> UInt {
18
+ let y = x. length
19
+ return y
20
+ }
21
+
You can’t perform that action at this time.
0 commit comments