Skip to content

Commit ad4815e

Browse files
szymon-rdKordyjan
authored andcommitted
Move tests
1 parent ad984d8 commit ad4815e

File tree

3 files changed

+40
-21
lines changed

3 files changed

+40
-21
lines changed

tests/neg-custom-args/fatal-warnings/i15503i.scala

+40-6
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ package foo.test.companionprivate:
7878
package foo.test.i16678:
7979
def foo(func: Int => String, value: Int): String = func(value) // OK
8080

81-
def run =
81+
def run =
8282
println(foo(number => number.toString, value = 5)) // OK
8383
println(foo(number => "<number>", value = 5)) // error
8484
println(foo(func = number => "<number>", value = 5)) // error
8585
println(foo(func = number => number.toString, value = 5)) // OK
8686
println(foo(func = _.toString, value = 5)) // OK
87-
87+
8888
package foo.test.possibleclasses:
8989
case class AllCaseClass(
9090
k: Int, // OK
@@ -93,7 +93,7 @@ package foo.test.possibleclasses:
9393
s: Int, // error /* But not these */
9494
val t: Int, // OK
9595
private val z: Int // error
96-
)
96+
)
9797

9898
case class AllCaseUsed(
9999
k: Int, // OK
@@ -113,7 +113,7 @@ package foo.test.possibleclasses:
113113
s: Int, // error
114114
val t: Int, // OK
115115
private val z: Int // error
116-
)
116+
)
117117

118118
class AllUsed(
119119
k: Int, // OK
@@ -124,10 +124,44 @@ package foo.test.possibleclasses:
124124
private val z: Int // OK
125125
) {
126126
def a = k + y + s + t + z
127-
}
127+
}
128128

129129
package foo.test.from.i16675:
130130
case class PositiveNumber private (i: Int) // OK
131131
object PositiveNumber:
132-
def make(i: Int): Option[PositiveNumber] = //OK
132+
def make(i: Int): Option[PositiveNumber] = //OK
133133
Option.when(i >= 0)(PositiveNumber(i)) // OK
134+
135+
package foo.test.i16822:
136+
enum ExampleEnum {
137+
case Build(context: String) // OK
138+
case List // OK
139+
}
140+
141+
def demo = {
142+
val x = ExampleEnum.List // OK
143+
println(x) // OK
144+
}
145+
146+
package foo.test.i16877:
147+
import scala.collection.immutable.HashMap // OK
148+
import scala.annotation.StaticAnnotation // OK
149+
150+
class ExampleAnnotation(val a: Object) extends StaticAnnotation // OK
151+
152+
@ExampleAnnotation(new HashMap()) // OK
153+
class Test //OK
154+
155+
package foo.test.i16926:
156+
def hello(): Unit =
157+
for {
158+
i <- (0 to 10).toList
159+
(a, b) = "hello" -> "world" // OK
160+
} yield println(s"$a $b")
161+
162+
package foo.test.i16925:
163+
def hello =
164+
for {
165+
i <- 1 to 2 if true
166+
_ = println(i) // OK
167+
} yield ()

tests/neg-custom-args/fatal-warnings/i16925.scala

-8
This file was deleted.

tests/neg-custom-args/fatal-warnings/i16926.scala

-7
This file was deleted.

0 commit comments

Comments
 (0)