   let _: Any? = p.p
 
   // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
-  // CHECK: function_ref @$S7ranking7genericyyxlF
-  generic(p.p)
+  // CHECK: function_ref @$S7ranking15genericOverloadyyxlF
+  genericOverload(p.p)
   // CHECK: witness_method $@opened("{{.*}}") P, #P.q!getter.1
-  // CHECK: function_ref @$S7ranking7genericyyxSglF
-  generic(p.q)
+  // CHECK: function_ref @$S7ranking15genericOverloadyyxSglF
+  genericOverload(p.q)
   // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
-  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
-  genericOpt(p.p)
+  // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
+  genericOptional(p.p)
   // CHECK: witness_method $@opened("{{.*}}") P, #P.q!getter.1
-  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
-  genericOpt(p.q)
+  // CHECK: function_ref @$S7ranking15genericOptionalyyxSglF
+  genericOptional(p.q)
+  // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
+  // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
+  genericNoOptional(p.p)
+  // CHECK: witness_method $@opened("{{.*}}") P, #P.q!getter.1
+  // CHECK: function_ref @$S7ranking17genericNoOptionalyyxlF
+  genericNoOptional(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 @$S7ranking7genericyyxlF
  generic(t.p)
  // CHECK: witness_method $T, #P.q!getter.1
  // CHECK: function_ref @$S7ranking7genericyyxSglF
  generic(t.q)
  // CHECK: witness_method $T, #P.p!getter.1
  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
  genericOpt(t.p)
  // CHECK: witness_method $T, #P.q!getter.1
  // CHECK: function_ref @$S7ranking10genericOptyyxSglF
  genericOpt(t.q)
}

extension P {

    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)
  }
}

