diff options
Diffstat (limited to 'tests/disabled')
9 files changed, 111 insertions, 0 deletions
diff --git a/tests/disabled/java-interop/pos/t1409/AbstractImpl.java b/tests/disabled/java-interop/pos/t1409/AbstractImpl.java new file mode 100644 index 000000000..b22a94fa1 --- /dev/null +++ b/tests/disabled/java-interop/pos/t1409/AbstractImpl.java @@ -0,0 +1,3 @@ +public abstract class AbstractImpl implements OuterInterface { + public abstract InnerInterface create(); + } diff --git a/tests/disabled/java-interop/pos/t1409/ConcreteImpl.scala b/tests/disabled/java-interop/pos/t1409/ConcreteImpl.scala new file mode 100644 index 000000000..d427e957e --- /dev/null +++ b/tests/disabled/java-interop/pos/t1409/ConcreteImpl.scala @@ -0,0 +1,3 @@ +class ConcreteImpl extends AbstractImpl { + def create : OuterInterface.InnerInterface = null + } diff --git a/tests/disabled/java-interop/pos/t1409/OuterInterface.java b/tests/disabled/java-interop/pos/t1409/OuterInterface.java new file mode 100644 index 000000000..dd288ceea --- /dev/null +++ b/tests/disabled/java-interop/pos/t1409/OuterInterface.java @@ -0,0 +1,5 @@ +public interface OuterInterface { + public interface InnerInterface { + public void foo(); + } + } diff --git a/tests/disabled/java-interop/pos/t1459/AbstractBase.java b/tests/disabled/java-interop/pos/t1459/AbstractBase.java new file mode 100755 index 000000000..492419416 --- /dev/null +++ b/tests/disabled/java-interop/pos/t1459/AbstractBase.java @@ -0,0 +1,5 @@ +package base; + +public abstract class AbstractBase { + public abstract void doStuff(String... params); // !!! was Object.. +}
\ No newline at end of file diff --git a/tests/disabled/java-interop/pos/t1459/App.scala b/tests/disabled/java-interop/pos/t1459/App.scala new file mode 100755 index 000000000..36e5022e9 --- /dev/null +++ b/tests/disabled/java-interop/pos/t1459/App.scala @@ -0,0 +1,18 @@ +package foo +import base._ + +object App extends scala.App { + class Concrete extends AbstractBase { + override def doStuff(params:java.lang.String*): Unit = println("doStuff invoked") + } + + val impl = new Concrete + + //succeeds + impl.doStuff(null) + + val caller = new Caller + + // fails with AbstractMethodError + caller.callDoStuff(impl) +} diff --git a/tests/disabled/java-interop/pos/t1459/Caller.java b/tests/disabled/java-interop/pos/t1459/Caller.java new file mode 100755 index 000000000..4ae51d8c5 --- /dev/null +++ b/tests/disabled/java-interop/pos/t1459/Caller.java @@ -0,0 +1,7 @@ +package base; + +public class Caller { + public void callDoStuff(AbstractBase impl) { + impl.doStuff("abc"); // was new Object()); + } +}
\ No newline at end of file diff --git a/tests/disabled/java-interop/pos/t1642/JavaCallingScalaHashMap.java b/tests/disabled/java-interop/pos/t1642/JavaCallingScalaHashMap.java new file mode 100644 index 000000000..976e465ff --- /dev/null +++ b/tests/disabled/java-interop/pos/t1642/JavaCallingScalaHashMap.java @@ -0,0 +1,8 @@ +import scala.collection.immutable.HashMap; +import scala.collection.immutable.Map; + +public class JavaCallingScalaHashMap { + public static void main( String[] args ) { + Map<String, Integer> hashMap = new HashMap<String, Integer>(); + } +} diff --git a/tests/disabled/not-representable/pos/t1357.scala b/tests/disabled/not-representable/pos/t1357.scala new file mode 100644 index 000000000..4095168d2 --- /dev/null +++ b/tests/disabled/not-representable/pos/t1357.scala @@ -0,0 +1,25 @@ +// Existential quantification cannot be expressed, and cannot be eliminated +// because it's F-bounded. Trying to paramerize BinaryTree with T instead also fails +// because the type alias cannot be represented + +object NonEmptyCons { + def unapply[H, T](c: (H, T)): Option[(H, T)] = Some(c) +} + + +object Main { + + type BT[+H, +T <: Tuple2[Tuple2[H, T], Tuple2[H, T]]] = Tuple2[H, T] + + // type T = Tuple2[String,String] + type BinaryTree[+E] = BT[E, T forSome { type T <: Tuple2[BT[E, T], BT[E, T]] }] + + def foo[E](tree: BinaryTree[E]): Unit = tree match { + case NonEmptyCons(_, tail) => { + tail match { + case NonEmptyCons(_, _) => { + } + } + } + } +} diff --git a/tests/disabled/not-representable/pos/t1381-new.scala b/tests/disabled/not-representable/pos/t1381-new.scala new file mode 100644 index 000000000..2944b1deb --- /dev/null +++ b/tests/disabled/not-representable/pos/t1381-new.scala @@ -0,0 +1,37 @@ +/* Gives + + t1381-new.scala:6: error: V is not a valid prefix for '#' + type E = V#ValueType + ^ + */ +import scala.reflect.runtime.universe._ + +class D[V <: Variable] + +class ID[V<:IV] extends D[V] { + type E = V#ValueType + def index(value:E) : Int = 0 + // Comment this out to eliminate crash. Or see below + def index(values:E*) : Iterable[Int] = null +} + +abstract class Variable { + type VT <: Variable + def d : D[VT] = null +} + +abstract class PV[T](initval:T) extends Variable { + type VT <: PV[T] + type ValueType = T +} + +trait IV extends Variable { + type ValueType +} + +abstract class EV[T](initval:T) extends PV[T](initval) with IV { + type VT <: EV[T] + override def d : ID[VT] = null + // Comment this out to eliminate crash + protected var indx = d.index(initval) +} |