Skip to content

Commit 5b3734a

Browse files
som-snytttgodzik
authored andcommitted
Regression tests (scala#22521)
Tests for scala#19413, scala#20070 and scala#23122
1 parent b0d5cd5 commit 5b3734a

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

tests/neg/i19413.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
import hello.bla.* // error
3+
4+
//transparent inline def hello: kla.type = kla // ok
5+
def hello: kla.type = kla
6+
7+
object kla:
8+
def ra = ???
9+
object bla { val ra1 = 31 }
10+
11+
//import kla.bla.ra1
12+
13+
@main def test = println:
14+
ra1

tests/pos/i20070.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
trait F[A]
3+
given F[Int] = new F {}
4+
def f[A: F] = { (x: A) => x }
5+
6+
@main def test =
7+
println(f[Int](1))

tests/warn/i23033.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ object Test {
99
}
1010
object Useful:
1111
given [T](using @unused ec: ExecutionContext): AnyRef with {}
12+
13+
class i23122(@unused param: AnyRef)

0 commit comments

Comments
 (0)