blob: 759fd22677df595b9617090c57522f94ebd2c69c (
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
56
57
58
59
60
61
62
63
64
|
trait A[@specialized(Int) T] { def foo: T }
class B extends A[Int] { val foo = 10 }
class C extends B
// issue 3309
class Lazy {
def test[U](block: => U): Unit = { block }
test { lazy val x = 1 }
}
// issue 3307
class Bug3307 {
def f[Z](block: String => Z): Unit = {
block("abc")
}
({ () =>
f { implicit x => println(x) } })()
}
// issue 3301
trait T[X]
class Bug3301 {
def t[A]: T[A] = sys.error("stub")
{() => {
type X = Int
def foo[X] = t[X]
()
}}
}
// issue 3299
object Failure {
def thunk(): Unit = {
for (i <- 1 to 2) {
val Array(a, b) = Array(1,2)
()
}
}
}
// issue 3296
object AA
{
def f(block: => Unit): Unit = {}
object BB
{
f {
object CC
()
}
}
def foo[T](x: T) = { object A; false }
}
// issue 3325
object O { def f[@specialized T]: Unit = { for(k <- Nil: List[T]) { } } }
|