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 @@ -752,6 +752,9 @@ bool SILFunction::hasDynamicSelfMetadata() const {
752752 selfTy = dynamicSelfTy.getSelfType ();
753753 }
754754
755+ if (selfTy.isForeignReferenceType ())
756+ return false ;
757+
755758 return !!selfTy.getClassOrBoundGenericClass ();
756759}
757760
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import StdlibUnittest
77import CxxShim
88import POD
99
10+ extension IntPair {
11+ static public func swiftMake( ) -> IntPair { IntPair . create ( ) }
12+ }
13+
1014struct StructHoldingPair {
1115 var pair : IntPair
1216} ;
@@ -49,6 +53,12 @@ PODTestSuite.test("var IntPair") {
4953 expectEqual ( x. test ( ) , 1 )
5054}
5155
56+ PODTestSuite . test ( " static extension " ) {
57+ var x = IntPair . swiftMake ( )
58+ expectEqual ( x. test ( ) , 1 )
59+ expectEqual ( x. testMutable ( ) , 1 )
60+ }
61+
5262PODTestSuite . test ( " let IntPair " ) {
5363 let x = IntPair . create ( )
5464 expectEqual ( x. test ( ) , 1 )
You can’t perform that action at this time.
0 commit comments