summaryrefslogtreecommitdiff
path: root/test/files/run/t3575.scala
blob: ef83e84f1435038778fee6917dfd9bbb9833c341 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// This is here to tell me if the behavior changes, not because
// the output is endorsed.
case class Two[
  @specialized(Specializable.Everything) A,
  @specialized(Specializable.Everything) B
](v: A, w: B)

case class TwoLong[
  @specialized(Char, Boolean, Byte, Short, Int, Long, Float, Double, Unit, AnyRef) A,
  @specialized(Char, Boolean, Byte, Short, Int, Long, Float, Double, Unit, AnyRef) B
](v: A, w: B)

case class TwoCool[
  @specialized(Specializable.Everything) A,
  @specialized(Specializable.Everything) B
](v: A, w: B)

case class TwoShort[
  @specialized(Specializable.Everything) A,
  @specialized(Specializable.Everything) B
](v: A, w: B)

case class TwoMinimal[
  @specialized(Int, AnyRef) A,
  @specialized(Int, AnyRef) B
](v: A, w: B)

object Test {
  def main(args: Array[String]): Unit = {
    println(Two("Hello", "World").getClass().getName());
    println(Two(12, "Hello").getClass().getName());
    println(Two("Hello", 12).getClass().getName());
    println(Two(12, 12).getClass().getName());

    println(TwoLong("Hello", "World").getClass().getName());
    println(TwoLong(12, "Hello").getClass().getName());
    println(TwoLong("Hello", 12).getClass().getName());
    println(TwoLong(12, 12).getClass().getName());

    println(TwoCool("Hello", "World").getClass().getName());
    println(TwoCool(12, "Hello").getClass().getName());
    println(TwoCool("Hello", 12).getClass().getName());
    println(TwoCool(12, 12).getClass().getName());

    println(TwoShort("Hello", "World").getClass().getName());
    println(TwoShort(12, "Hello").getClass().getName());
    println(TwoShort("Hello", 12).getClass().getName());
    println(TwoShort(12, 12).getClass().getName());

    println(TwoMinimal("Hello", "World").getClass().getName());
    println(TwoMinimal(12, "Hello").getClass().getName());
    println(TwoMinimal("Hello", 12).getClass().getName());
    println(TwoMinimal(12, 12).getClass().getName());
  }
}