Skip to content

Commit ac3f5dc

Browse files
committed
Adjust more tests
1 parent 57347d8 commit ac3f5dc

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

tests/pos/i17314.scala renamed to tests/warn/i17314.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -Wunused:all -deprecation -feature
1+
//> using options -Wunused:all -deprecation -feature
22

33
import java.net.URI
44

@@ -10,9 +10,7 @@ object circelike {
1010
type Configuration
1111
trait ConfiguredCodec[T]
1212
object ConfiguredCodec:
13-
inline final def derived[A](using conf: Configuration)(using
14-
inline mirror: Mirror.Of[A]
15-
): ConfiguredCodec[A] =
13+
inline final def derived[A](using conf: Configuration)(using inline mirror: Mirror.Of[A]): ConfiguredCodec[A] = // warn // warn
1614
class InlinedConfiguredCodec extends ConfiguredCodec[A]:
1715
val codec = summonInline[Codec[URI]] // simplification
1816
new InlinedConfiguredCodec

tests/pos/i17314a.scala renamed to tests/warn/i17314a.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -Wunused:all -deprecation -feature
1+
//> using options -Wunused:all -deprecation -feature
22

33
package foo:
44
class Foo[T]

tests/warn/i17314b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Wunused:all
1+
//> using options -Wunused:all
22

33
package foo:
44
class Foo[T]

tests/warn/scala2-t11681.scala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ trait BadAPI extends InterFace {
2323
a
2424
}
2525
override def call(a: Int,
26-
b: String, // OK
26+
b: String, // warn now
2727
c: Double): Int = {
2828
println(c)
2929
a
@@ -33,7 +33,7 @@ trait BadAPI extends InterFace {
3333

3434
override def equals(other: Any): Boolean = true // OK
3535

36-
def i(implicit s: String) = answer // ok
36+
def i(implicit s: String) = answer // warn now
3737

3838
/*
3939
def future(x: Int): Int = {
@@ -62,7 +62,7 @@ case class CaseyKasem(k: Int) // OK
6262
case class CaseyAtTheBat(k: Int)(s: String) // ok
6363

6464
trait Ignorance {
65-
def f(readResolve: Int) = answer // ok
65+
def f(readResolve: Int) = answer // warn now
6666
}
6767

6868
class Reusing(u: Int) extends Unusing(u) // OK
@@ -78,30 +78,30 @@ trait Unimplementation {
7878

7979
trait DumbStuff {
8080
def f(implicit dummy: DummyImplicit) = answer // ok
81-
def g(dummy: DummyImplicit) = answer // ok
81+
def g(dummy: DummyImplicit) = answer // warn now
8282
}
8383
trait Proofs {
8484
def f[A, B](implicit ev: A =:= B) = answer // ok
8585
def g[A, B](implicit ev: A <:< B) = answer // ok
86-
def f2[A, B](ev: A =:= B) = answer // ok
87-
def g2[A, B](ev: A <:< B) = answer // ok
86+
def f2[A, B](ev: A =:= B) = answer // warn now
87+
def g2[A, B](ev: A <:< B) = answer // warn now
8888
}
8989

9090
trait Anonymous {
91-
def f = (i: Int) => answer // ok
91+
def f = (i: Int) => answer // warn now
9292

9393
def f1 = (_: Int) => answer // OK
9494

9595
def f2: Int => Int = _ + 1 // OK
9696

97-
def g = for (i <- List(1)) yield answer // ok
97+
def g = for (i <- List(1)) yield answer // warn
9898
}
9999
trait Context[A]
100100
trait Implicits {
101-
def f[A](implicit ctx: Context[A]) = answer // ok
102-
def g[A: Context] = answer // OK
101+
def f[A](implicit ctx: Context[A]) = answer // warn
102+
def g[A: Context] = answer // warn
103103
}
104-
class Bound[A: Context] // OK
104+
class Bound[A: Context] // warn
105105
object Answers {
106106
def answer: Int = 42
107107
}

0 commit comments

Comments
 (0)