aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicits2.scala
blob: a201ed5f9e1a286d2faf427afb5736971017241d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Compile with

    dotc implicits2.scala -Xprint:front -Xprint-types -verbose

    and verify that the inserted wrapString comes from Predef. You should see

    val x: <root>.scala.collection.immutable.WrappedString =
      <
        <scala.Predef.wrapString:
          ((s: java.lang.String)scala.collection.immutable.WrappedString)
        >
      (<"abc":java.lang.String("abc")>):scala.collection.immutable.WrappedString
        >
*/
object implicits2 {

  val x: scala.collection.immutable.WrappedString = "abc"

  implicit val (xx: String, y: Int) = ("a", 22)

  def main(args: Array[String]) = {
    println(implicitly[String])
    println(implicitly[Int])
  }
}