Skip to content

Commit f28d7a9

Browse files
committed
Merge pull request #65 from samuelgruetter/scala-tests-raw
Add untried tests from scala/test/files/{pos,neg}
2 parents 9cd9d97 + 9ef5f68 commit f28d7a9

File tree

3,539 files changed

+49725
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,539 files changed

+49725
-0
lines changed

tests/untried/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.log
2+
*.obj/

tests/untried/filters

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
#Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28).
3+
Java HotSpot\(TM\) .* warning:
4+
# Hotspot receiving VM options through the $_JAVA_OPTIONS
5+
# env variable outputs them on stderr
6+
Picked up _JAVA_OPTIONS:
7+
# Filter out a message caused by this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8021205
8+
objc\[\d+\]: Class JavaLaunchHelper is implemented in both .* and .*\. One of the two will be used\. Which one is undefined\.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
abstract-class-2.scala:11: error: object creation impossible, since method f in trait S2 of type (x: P2.this.p.S1)Int is not defined
2+
(Note that P.this.p.S1 does not match P2.this.S1: their prefixes (i.e. enclosing instances) differ)
3+
object O2 extends S2 {
4+
^
5+
one error found
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class P {
2+
trait S1
3+
val p = new P
4+
5+
trait S2 {
6+
def f(x: p.S1): Int
7+
}
8+
}
9+
10+
class P2 extends P {
11+
object O2 extends S2 {
12+
def f(x: S1) = 5
13+
}
14+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
S.scala:1: error: class S needs to be abstract, since method g in class J of type (y: Int, z: java.util.List)Int is not defined
2+
(Note that java.util.List does not match java.util.List[String]. To implement a raw type, use java.util.List[_])
3+
class S extends J {
4+
^
5+
one error found
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public abstract class J {
2+
public abstract int f();
3+
public abstract int g(int y, java.util.List z);
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class S extends J {
2+
def f() = 55
3+
def g(y: Int, z: java.util.List[String]) = 11
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
abstract-concrete-methods.scala:7: error: class Outer2 needs to be abstract, since method score in trait Outer of type (i: Outer2#Inner)Double is not defined
2+
(Note that This#Inner does not match Outer2#Inner: class Inner in class Outer2 is a subclass of trait Inner in trait Outer, but method parameter types must match exactly.)
3+
class Outer2 extends Outer[Outer2] {
4+
^
5+
one error found
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
trait Outer[This <: Outer[This]] {
2+
self: This =>
3+
4+
trait Inner
5+
def score(i: This#Inner): Double
6+
}
7+
class Outer2 extends Outer[Outer2] {
8+
class Inner extends super.Inner
9+
def score(i: Outer2#Inner) = 0.0
10+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
abstract-explaintypes.scala:6: error: type mismatch;
2+
found : A
3+
required: A.this.T
4+
def foo2: T = bar().baz();
5+
^
6+
A <: A.this.T?
7+
false
8+
abstract-explaintypes.scala:9: error: type mismatch;
9+
found : A
10+
required: A.this.T
11+
def foo5: T = baz().baz();
12+
^
13+
A <: A.this.T?
14+
false
15+
two errors found

0 commit comments

Comments
 (0)