   // CHECK:   end_borrow [[BORROWED_BUF_KLASS]]
   // CHECK:   destroy_value [[BUF_KLASS]]
   // CHECK:   return [[COPY_CASTED_BORROWED_BUF_KLASS]]
-  // CHECK: } // end sil function '_T0s6Klass2C23getBufferAsNativeObjectBoyF'
+  // CHECK: } // end sil function '_T0s15KlassWithBufferC03getC14AsNativeObjectBoyF'
   func getBufferAsNativeObject() -> Builtin.NativeObject {
     return Builtin.unsafeCastToNativeObject(buffer.k)
   }
 }
 
+struct StructContainingBridgeObject {
+  var rawValue: Builtin.BridgeObject
+
+  // CHECK-LABEL: sil hidden @_T0s28StructContainingBridgeObjectVAByXl8swiftObj_tcfC : $@convention(method) (@guaranteed AnyObject, @thin StructContainingBridgeObject.Type) -> @owned StructContainingBridgeObject {
+  // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject,
+  // CHECK:   [[CASTED_ARG:%.*]] = unchecked_ref_cast [[ARG]] : $AnyObject to $Builtin.BridgeObject
+  // CHECK:   [[COPY_CASTED_ARG:%.*]] = copy_value [[CASTED_ARG]]
+  // CHECK:   assign [[COPY_CASTED_ARG]] to
+  // CHECK: } // end sil function '_T0s28StructContainingBridgeObjectVAByXl8swiftObj_tcfC'
+  init(swiftObj: AnyObject) {
+    rawValue = Builtin.reinterpretCast(swiftObj)
+  }
+}


// This test checks specific codegen related to normal arguments being passed at
// +0. Eventually, it should be merged into normal SILGen tests.

precedencegroup AssignmentPrecedence {
  assignment: true

  }
}

typealias AnyObject = Builtin.AnyObject

///////////
// Tests //
///////////

class KlassWithBuffer {
  var buffer: Buffer
  init() {
    buffer = Buffer(inK: Klass())
