File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ //> using options -Wunused:imports
2+
3+ def i23967 : Boolean = {
4+ // import scala.compiletime.testing.typeCheckErrors
5+ import scala .compiletime .testing .* // warn
6+ typeChecks(" 2 + 2" )
7+ }
8+
9+ package p:
10+ val code = """ "hello, world""""
11+ package c:
12+ class C (i : Int )
13+
14+ package q:
15+ import c .* // warn should be nowarn
16+ import p .* // warn should be nowarn
17+ import scala .compiletime .testing .*
18+ def test () = typeCheckErrors(""" println(C("hello, world"))""" )
19+ def ok () = typeChecks(" println(code)" )
20+ inline def f (inline i : Int ) = 42 + i
21+
22+ package i23967b:
23+ package ok:
24+ import scala .compiletime .testing .* // warn
25+ def test () = typeChecks(" 42 + 27" )
26+ package nok:
27+ import scala .compiletime .testing .typeChecks // warn
28+ def test () = typeChecks(" 42 + 27" )
29+
30+ @ main def Test = println :
31+ q.f(27 )
You can’t perform that action at this time.
0 commit comments