File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import scala .tools .partest .DirectTest
2
+
3
+ object Test extends DirectTest {
4
+
5
+ override def extraSettings : String =
6
+ s " -usejavacp -d ${testOutput.path}"
7
+
8
+ override def code = """
9
+ object O extends C {
10
+ def main(args: Array[String]): Unit = {
11
+ }
12
+ // Static forwarder for foo and setter_foo_= added more once in a multi-run compile.
13
+ }
14
+ """ .trim
15
+
16
+ override def show (): Unit = {
17
+ val global = newCompiler()
18
+ Console .withErr(System .out) {
19
+ compileString(global)(code)
20
+ compileString(global)(code)
21
+ loadClass // was "duplicate name and signature in class X"
22
+ }
23
+ }
24
+
25
+ def loadClass : Class [_] = {
26
+ val cl = new java.net.URLClassLoader (Array (testOutput.toFile.toURL));
27
+ cl.loadClass(" O" )
28
+ }
29
+ }
30
+
31
+ trait T {
32
+ val foo : String = " "
33
+ }
34
+ class C extends T
35
+
You can’t perform that action at this time.
0 commit comments