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 {
659659 selfTy = dynamicSelfTy.getSelfType ();
660660 }
661661
662+ if (selfTy.isForeignReferenceType ())
663+ return false ;
664+
662665 return !!selfTy.getClassOrBoundGenericClass ();
663666}
664667
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