Skip to content

Commit 81a005c

Browse files
committed
More tests as requested
1 parent 1fc9b1b commit 81a005c

File tree

1 file changed

+57
-3
lines changed

1 file changed

+57
-3
lines changed

tests/pos/i5720.scala

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
1-
class A[B[_] <: Long]
1+
// Ensure we omit valid JVM generic signatures when upper bounds are primitive
2+
// types. Java generic signatures cannot use primitive types in that position.
3+
4+
class AUnit[B[_] <: Unit]
5+
class ABoolean[B[_] <: Boolean]
6+
7+
class AByte[B[_] <: Byte]
8+
class AChar[B[_] <: Char]
9+
10+
class AShort[B[_] <: Short]
11+
class AInt[B[_] <: Int]
12+
class ALong[B[_] <: Long]
13+
14+
class AFloat[B[_] <: Float]
15+
class ADouble[B[_] <: Double]
16+
17+
class ValClU(val i: Unit) extends AnyVal
18+
class AValClU[B[_] <: ValClU]
19+
class ValClI(val i: Int) extends AnyVal
20+
class AValClI[B[_] <: ValClI]
21+
222
object Main {
3-
type C = A[[x] => Long]
4-
type D = A[[x] => Nothing]
23+
type AUL = AUnit[[x] => Unit]
24+
type AUN = AUnit[[x] => Nothing]
25+
26+
type ABL = ABoolean[[x] => Boolean]
27+
type ABN = ABoolean[[x] => Nothing]
28+
29+
30+
type AByL = AByte[[x] => Byte]
31+
type AByN = AByte[[x] => Nothing]
32+
33+
type ACL = AChar[[x] => Char]
34+
type ACN = AChar[[x] => Nothing]
35+
36+
37+
type ASL = AShort[[x] => Short]
38+
type ASN = AShort[[x] => Nothing]
39+
40+
type AIL = AInt[[x] => Int]
41+
type AIN = AInt[[x] => Nothing]
42+
43+
type ALL = ALong[[x] => Long]
44+
type ALN = ALong[[x] => Nothing]
45+
46+
47+
type AFL = AFloat[[x] => Float]
48+
type AFN = AFloat[[x] => Nothing]
49+
50+
type ADL = ADouble[[x] => Double]
51+
type ADN = ADouble[[x] => Nothing]
52+
53+
54+
type ACUL = AValClU[[x] => ValClU]
55+
type ACUN = AValClU[[x] => Nothing]
56+
57+
type ACIL = AValClI[[x] => ValClI]
58+
type ACIN = AValClI[[x] => Nothing]
559
}

0 commit comments

Comments
 (0)