     let _: Any = self.p
     // CHECK: witness_method $Self, #P.p!getter.1
     let _: Any? = self.p
+
+    // CHECK: witness_method $Self, #P.p!getter.1
+    // CHECK: function_ref @$S7ranking15genericOverloadyyxlF
+    genericOverload(self.p)
+    // CHECK: witness_method $Self, #P.q!getter.1
+    // CHECK: function_ref @$S7ranking15genericOverloadyyxSglF
+    genericOverload(self.q)
+    // CHECK: witness_method $Self, #P.p!getter.1
+    // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
+    genericOptional(self.p)
+    // CHECK: witness_method $Self, #P.q!getter.1
+    // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
+    genericOptional(self.q)
+    // CHECK: witness_method $Self, #P.p!getter.1
+    // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
+    genericNoOptional(self.p)
+    // CHECK: witness_method $Self, #P.q!getter.1
+    // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
+    genericNoOptional(self.q)
   }
 }
 

  let _: Any? = p.p

  // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
  // CHECK: function_ref @$S7ranking7genericyyxlF
  generic(p.p)
  // CHECK: witness_method $@opened("{{.*}}") P, #P.q!getter.1
  // CHECK: function_ref @$S7ranking7genericyyxSglF
  generic(p.q)
  // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
  genericOpt(p.p)
  // CHECK: witness_method $@opened("{{.*}}") P, #P.q!getter.1
  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
  genericOpt(p.q)

  // CHECK: witness_method $T, #P.p!getter.1
  let _ = t.p

  let _: Any? = t.p

  // CHECK: witness_method $T, #P.p!getter.1
  // CHECK: function_ref @$S7ranking15genericOverloadyyxlF
  genericOverload(t.p)
  // CHECK: witness_method $T, #P.q!getter.1
  // CHECK: function_ref @$S7ranking15genericOverloadyyxSglF
  genericOverload(t.q)
  // CHECK: witness_method $T, #P.p!getter.1
  // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
  genericOptional(t.p)
  // CHECK: witness_method $T, #P.q!getter.1
  // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
  genericOptional(t.q)
  // CHECK: witness_method $T, #P.p!getter.1
  // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
  genericNoOptional(t.p)
  // CHECK: witness_method $T, #P.q!getter.1
  // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
  genericNoOptional(t.q)
}

extension P {
