diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2009-09-11 10:34:02 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2009-09-11 10:34:02 +0000 |
commit | 57ed4ca11459b48f2310c81beef1d31476494d25 (patch) | |
tree | f310b1456553557c67a6baae9b7d095436a6a144 /test | |
parent | 10cf73815b04d3d3d214adc1d5176daa81916e8f (diff) | |
download | scala-57ed4ca11459b48f2310c81beef1d31476494d25.tar.gz scala-57ed4ca11459b48f2310c81beef1d31476494d25.tar.bz2 scala-57ed4ca11459b48f2310c81beef1d31476494d25.zip |
Fixed #2201 (slight rewrite of paulp's patch at...
Fixed #2201 (slight rewrite of paulp's patch at
http://github.com/paulp/scala/commit/24419959b4d6c93716c216bbf276948a830
4b4e6)
ImplicitSearch::cacheResult now clones symbols that represent bound
variables (more specifically, parameters of anonymous functions that
are used as implicit values) to ensure that different bound variables
are represented by different symbols (otherwise lambda lifting gets
confused).
updated check file for bug692: error-reporting got more complete because
TypeRef::transform has been relaxed slightly
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug692.check | 7 | ||||
-rw-r--r-- | test/files/pos/ticket2201.scala | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test/files/neg/bug692.check b/test/files/neg/bug692.check index 14df1917d9..9e96027899 100644 --- a/test/files/neg/bug692.check +++ b/test/files/neg/bug692.check @@ -13,7 +13,12 @@ bug692.scala:13: error: class Foo takes type parameters bug692.scala:14: error: class Foo takes type parameters implicit def typeOfBar[T4 <: Foo](implicit elem : RefType[T4]) : RefType[Bar[T4]] = ^ +bug692.scala:15: error: type mismatch; + found : test3.this.BarType[T4] + required: test3.this.RefType[test3.this.Bar[T4]] + BarType(elem); + ^ bug692.scala:19: error: class Foo takes type parameters class Bar[A <: Foo](implicit tpeA : Type[A]) extends Foo; ^ -6 errors found +7 errors found diff --git a/test/files/pos/ticket2201.scala b/test/files/pos/ticket2201.scala new file mode 100644 index 0000000000..275867b88e --- /dev/null +++ b/test/files/pos/ticket2201.scala @@ -0,0 +1,8 @@ +class Test +object Test { implicit def view(x : Test) = 0 } + +object Call { + def call(implicit view : Test => Int) = view(null) + call + call +}
\ No newline at end of file |