<commit_before>class S1 {def s = this}
class S2 {def s = this}

object simple {
  implicit def m1(f: Int => Int) = new S1

  implicit def m2(l: Seq[Int]) = new S2

  val c = List(1).s // correctly resolves m2
}

object param1 {
  implicit def m1[A](f: Int => A) = new S1

  implicit def m2[A](l: Seq[A]) = new S2

  val c = List(1).s // correctly resolves m2
}

object param2 {
  implicit def m1[I, A](f: I => A) = new S1

  implicit def m2[A](l: Seq[A]) = new S2

  val c = List(1).s // incorrectly resolves as ambiguous
}
object param3 {
  implicit def m1[I, A](f: I => A) = new S1

  implicit def m2[M[X] <: Seq[X], A](l: M[A]) = new S2

  val c = List(1).s // incorrectly resolves m1
}
/*start*/(simple.c, param1.c, param2.c, param3.c)/*end*/

//(S2, S2, S2, S2)<commit_msg>simplifiy test case for SCL2381 -- the problem is with contra-variant type parameters<commit_after>class S1 {def s = this}
class S2 {def s = this}

object param1 {
  trait T[-A]
  trait U extends T[Int]

  implicit def m1[M11](f: T[M11]) = new S1
  implicit def m2(l: U) = new S2

  val u: U = new U {}
  u.s // incorrectly resolves as ambiguous
}

/*start*/param1.c/*end*/

//S2
{'fraction_non_alphanumeric': 0.1581676750216076, 'fraction_numerical': 0.0449438202247191, 'mean_word_length': 3.0069204152249136, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3302183', 'n_tokens_mistral': 495, 'n_tokens_neox': 485, 'n_words': 159}