diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-12-16 16:38:09 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-12-16 16:38:09 +0100 |
commit | 42851ed2675015d42bb341b82a09bd0bef4a8ce4 (patch) | |
tree | 06806b4183cf74a43553e9a8a9acfeff84fdf712 /tests/pending/pos/t6169 | |
parent | 5be609fc4e04e3cca5e1435ee41b8cacac9b0513 (diff) | |
download | dotty-42851ed2675015d42bb341b82a09bd0bef4a8ce4.tar.gz dotty-42851ed2675015d42bb341b82a09bd0bef4a8ce4.tar.bz2 dotty-42851ed2675015d42bb341b82a09bd0bef4a8ce4.zip |
move failing tests from tests/untried/pos to tests/pending/pos
Diffstat (limited to 'tests/pending/pos/t6169')
-rw-r--r-- | tests/pending/pos/t6169/Exist.java | 4 | ||||
-rw-r--r-- | tests/pending/pos/t6169/ExistF.java | 4 | ||||
-rw-r--r-- | tests/pending/pos/t6169/ExistIndir.java | 4 | ||||
-rw-r--r-- | tests/pending/pos/t6169/OP.java | 1 | ||||
-rw-r--r-- | tests/pending/pos/t6169/Skin.java | 1 | ||||
-rw-r--r-- | tests/pending/pos/t6169/Skinnable.java | 3 | ||||
-rw-r--r-- | tests/pending/pos/t6169/skinnable.scala | 14 | ||||
-rw-r--r-- | tests/pending/pos/t6169/t6169.scala | 7 |
8 files changed, 38 insertions, 0 deletions
diff --git a/tests/pending/pos/t6169/Exist.java b/tests/pending/pos/t6169/Exist.java new file mode 100644 index 000000000..dfc6b36b3 --- /dev/null +++ b/tests/pending/pos/t6169/Exist.java @@ -0,0 +1,4 @@ +public class Exist<T extends String> { + // java helpfully re-interprets Exist<?> as Exist<? extends String> + public Exist<?> foo() { throw new RuntimeException(); } +}
\ No newline at end of file diff --git a/tests/pending/pos/t6169/ExistF.java b/tests/pending/pos/t6169/ExistF.java new file mode 100644 index 000000000..70fabd74c --- /dev/null +++ b/tests/pending/pos/t6169/ExistF.java @@ -0,0 +1,4 @@ +public class ExistF<T extends ExistF<T>> { + // java helpfully re-interprets ExistF<?> as ExistF<?0 extends ExistF<?0>> + public ExistF<?> foo() { throw new RuntimeException(); } +}
\ No newline at end of file diff --git a/tests/pending/pos/t6169/ExistIndir.java b/tests/pending/pos/t6169/ExistIndir.java new file mode 100644 index 000000000..e66d1698c --- /dev/null +++ b/tests/pending/pos/t6169/ExistIndir.java @@ -0,0 +1,4 @@ +public class ExistIndir<T extends String, U extends T> { + // java helpfully re-interprets ExistIndir<?> as ExistIndir<? extends String> + public ExistIndir<?, ?> foo() { throw new RuntimeException(); } +} diff --git a/tests/pending/pos/t6169/OP.java b/tests/pending/pos/t6169/OP.java new file mode 100644 index 000000000..15e4c5640 --- /dev/null +++ b/tests/pending/pos/t6169/OP.java @@ -0,0 +1 @@ +public abstract class OP<T> { } diff --git a/tests/pending/pos/t6169/Skin.java b/tests/pending/pos/t6169/Skin.java new file mode 100644 index 000000000..780de1ee0 --- /dev/null +++ b/tests/pending/pos/t6169/Skin.java @@ -0,0 +1 @@ +public interface Skin<C extends Skinnable> { } diff --git a/tests/pending/pos/t6169/Skinnable.java b/tests/pending/pos/t6169/Skinnable.java new file mode 100644 index 000000000..f91eaa30d --- /dev/null +++ b/tests/pending/pos/t6169/Skinnable.java @@ -0,0 +1,3 @@ +public interface Skinnable { + OP<Skin<?>> skinProperty(); +} diff --git a/tests/pending/pos/t6169/skinnable.scala b/tests/pending/pos/t6169/skinnable.scala new file mode 100644 index 000000000..08204f29d --- /dev/null +++ b/tests/pending/pos/t6169/skinnable.scala @@ -0,0 +1,14 @@ +object ObjectProperty { + implicit def jfxObjectProperty2sfx[T](p: OP[T]) = new ObjectProperty[T](p) +} + +class ObjectProperty[T](val delegate: OP[T]) + +trait TestWildcardBoundInference { + def delegate: Skinnable + def skin: ObjectProperty[Skin[_ /* inferred: <: Skinnable */]] = ObjectProperty.jfxObjectProperty2sfx(delegate.skinProperty) + skin: ObjectProperty[Skin[_ <: Skinnable]] + + def skinCheckInference = delegate.skinProperty + skinCheckInference: ObjectProperty[Skin[_ <: Skinnable]] +} diff --git a/tests/pending/pos/t6169/t6169.scala b/tests/pending/pos/t6169/t6169.scala new file mode 100644 index 000000000..84b2d2dad --- /dev/null +++ b/tests/pending/pos/t6169/t6169.scala @@ -0,0 +1,7 @@ +class Test { + class MyExist extends ExistF[MyExist] + // SI-8197, SI-6169: java infers the bounds of existentials, so we have to as well now that SI-1786 is fixed... + def stringy: Exist[_ <: String] = (new Exist[String]).foo + def fbounded: (ExistF[t] forSome {type t <: ExistF[t] }) = (new MyExist).foo + def indir: ExistIndir[_ <: String, _ <: String] = (new ExistIndir[String, String]).foo +} |