Skip to content

Commit f6d1af8

Browse files
authored
Merge pull request #6749 from dotty-staging/add-tests
Miscellaneous tests
2 parents 10526a7 + 32fedbb commit f6d1af8

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

tests/pos/i6670.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
case class X[A](
2+
foo: A,
3+
bar: String = ""
4+
) {
5+
def copy[A](
6+
foo: A = foo,
7+
bar: String = bar
8+
): X[A] = ???
9+
}
10+
object Test {
11+
val x = X(1)
12+
x.copy(bar = "BAZ")
13+
}

tests/pos/t11593.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
java.util.Properties

tests/pos/t11593/Properties.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package foo
2+
class Properties

tests/pos/t11593/Test.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package foo {
2+
import java.util._
3+
object X {
4+
def bar(x: Properties): Unit = println(x.getClass.getName)
5+
bar(new Properties)
6+
}
7+
}
8+
object Test extends App {
9+
foo.X
10+
}

0 commit comments

Comments
 (0)