File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
test/Interop/Cxx/foreign-reference Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,9 @@ bool SILFunction::hasDynamicSelfMetadata() const {
659
659
selfTy = dynamicSelfTy.getSelfType ();
660
660
}
661
661
662
+ if (selfTy.isForeignReferenceType ())
663
+ return false ;
664
+
662
665
return !!selfTy.getClassOrBoundGenericClass ();
663
666
}
664
667
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import StdlibUnittest
7
7
import CxxShim
8
8
import POD
9
9
10
+ extension IntPair {
11
+ static public func swiftMake( ) -> IntPair { IntPair . create ( ) }
12
+ }
13
+
10
14
struct StructHoldingPair {
11
15
var pair : IntPair
12
16
} ;
@@ -49,6 +53,12 @@ PODTestSuite.test("var IntPair") {
49
53
expectEqual ( x. test ( ) , 1 )
50
54
}
51
55
56
+ PODTestSuite . test ( " static extension " ) {
57
+ var x = IntPair . swiftMake ( )
58
+ expectEqual ( x. test ( ) , 1 )
59
+ expectEqual ( x. testMutable ( ) , 1 )
60
+ }
61
+
52
62
PODTestSuite . test ( " let IntPair " ) {
53
63
let x = IntPair . create ( )
54
64
expectEqual ( x. test ( ) , 1 )
You can’t perform that action at this time.
0 commit comments