diff options
author | odersky <odersky@gmail.com> | 2015-01-31 19:32:17 +0100 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2015-01-31 19:32:17 +0100 |
commit | 698935a661122ea2ba983cdab29805f15f8a153c (patch) | |
tree | ff13a07330ff5332eda3a1b9ff3118eb491c0d2c /tests | |
parent | a822fc15235d9cc91302bd82d180830eff357ae2 (diff) | |
parent | 57b616c1a7adc78dd46cb3ae5545e312c11e69be (diff) | |
download | dotty-698935a661122ea2ba983cdab29805f15f8a153c.tar.gz dotty-698935a661122ea2ba983cdab29805f15f8a153c.tar.bz2 dotty-698935a661122ea2ba983cdab29805f15f8a153c.zip |
Merge pull request #338 from dotty-staging/fix/t3152-findMember
Fix/t3152 find member
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/t3020.scala (renamed from tests/pending/pos/t3020.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t3037.scala (renamed from tests/pending/pos/t3037.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t304.scala (renamed from tests/pending/pos/t304.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t3106.scala (renamed from tests/pending/pos/t3106.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t3137.scala (renamed from tests/pending/pos/t3137.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t3152.scala (renamed from tests/pending/pos/t3152.scala) | 0 | ||||
-rwxr-xr-x | tests/pos/t3174.scala (renamed from tests/pending/pos/t3174.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t3177.scala (renamed from tests/pending/pos/t3177.scala) | 0 | ||||
-rw-r--r-- | tests/pos/t8023.scala | 9 | ||||
-rw-r--r-- | tests/pos/t9004.scala | 29 |
10 files changed, 38 insertions, 0 deletions
diff --git a/tests/pending/pos/t3020.scala b/tests/pos/t3020.scala index 016563e27..016563e27 100644 --- a/tests/pending/pos/t3020.scala +++ b/tests/pos/t3020.scala diff --git a/tests/pending/pos/t3037.scala b/tests/pos/t3037.scala index b71ffe041..b71ffe041 100644 --- a/tests/pending/pos/t3037.scala +++ b/tests/pos/t3037.scala diff --git a/tests/pending/pos/t304.scala b/tests/pos/t304.scala index 76da44157..76da44157 100644 --- a/tests/pending/pos/t304.scala +++ b/tests/pos/t304.scala diff --git a/tests/pending/pos/t3106.scala b/tests/pos/t3106.scala index a9591d0aa..a9591d0aa 100644 --- a/tests/pending/pos/t3106.scala +++ b/tests/pos/t3106.scala diff --git a/tests/pending/pos/t3137.scala b/tests/pos/t3137.scala index cb7317af0..cb7317af0 100644 --- a/tests/pending/pos/t3137.scala +++ b/tests/pos/t3137.scala diff --git a/tests/pending/pos/t3152.scala b/tests/pos/t3152.scala index 3d1dcbd6f..3d1dcbd6f 100644 --- a/tests/pending/pos/t3152.scala +++ b/tests/pos/t3152.scala diff --git a/tests/pending/pos/t3174.scala b/tests/pos/t3174.scala index 8d9b2578d..8d9b2578d 100755 --- a/tests/pending/pos/t3174.scala +++ b/tests/pos/t3174.scala diff --git a/tests/pending/pos/t3177.scala b/tests/pos/t3177.scala index 12dfce6ee..12dfce6ee 100644 --- a/tests/pending/pos/t3177.scala +++ b/tests/pos/t3177.scala diff --git a/tests/pos/t8023.scala b/tests/pos/t8023.scala new file mode 100644 index 000000000..66d478abd --- /dev/null +++ b/tests/pos/t8023.scala @@ -0,0 +1,9 @@ +class C[K] +class D[K] + +object Test3 { + def foo = (null: Any) match { + case a: C[k] => new C[k]() // this one worked before as the info of `A` was complete + // () + } +} diff --git a/tests/pos/t9004.scala b/tests/pos/t9004.scala new file mode 100644 index 000000000..d591bc852 --- /dev/null +++ b/tests/pos/t9004.scala @@ -0,0 +1,29 @@ +object Main { + trait AA[RR] { type R = RR; def r: R } + + def test1(a: AA[_]) = { + val f = () => a.r + // The tree a.r is given the type `a.R` which normalizes + // to B', where B' is a distinct symbol ("captured existential skolem") + // to substitute for the reference to an existential skolem of B. + // + // inference of the result type of the function computes the + // packed type of tree `a.r` to make sure that terms and types + // local to the body of the function don't leak into its result + // type. The captured existential skolem is considered to be local + // so it is abstracted to its upper bound, Any. + // + // However, the packedType transformation need not have even considered + // B', as it is clear that the type `a.R` is not local to the function + // body! + f: (() => a.R) + + // The workaround is to annotate the function type, rather than + // relying in inference. + val g: (() => a.R) = () => a.r + val g2 = () => a.r + + () + } + // typer debug trace: http://rawgit.com/retronym/d5aeaf8e0a4a2e6eef4b/raw/out.html +} |