diff options
author | Martin Odersky <odersky@gmail.com> | 2008-04-04 18:00:26 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-04-04 18:00:26 +0000 |
commit | f9a68fb01de1edd3fa620912bbe75897133cc81b (patch) | |
tree | b75321225503a24060ce665cdbeb3e1c95d7eb09 /test/files/neg/divergent-implicit.scala | |
parent | 768d107385af8f700be33b22444e537091d7f0ef (diff) | |
download | scala-f9a68fb01de1edd3fa620912bbe75897133cc81b.tar.gz scala-f9a68fb01de1edd3fa620912bbe75897133cc81b.tar.bz2 scala-f9a68fb01de1edd3fa620912bbe75897133cc81b.zip |
(1) more changes for dynamic cycle detection of...
(1) more changes for dynamic cycle detection of implicits 2) change
(to wildcard scoping in types 3) suppress $tag generation for purely
(abstract traits 4) increase stacksize for sabbus to 32m (otherwise
(problems on Windows)
Diffstat (limited to 'test/files/neg/divergent-implicit.scala')
-rw-r--r-- | test/files/neg/divergent-implicit.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/divergent-implicit.scala b/test/files/neg/divergent-implicit.scala new file mode 100644 index 0000000000..4a356d54f7 --- /dev/null +++ b/test/files/neg/divergent-implicit.scala @@ -0,0 +1,16 @@ +object Test1 { + implicit def cast[A, B](x: A)(implicit c: A => B): B = c(x) + + val x1: String = 1 + val x2: String = cast[Int, String](1) +} +object Test2 { + class Foo + class Bar + class Baz + implicit def foo2bar(x: Foo)(implicit baz2bar: Baz => Bar): Bar = baz2bar(new Baz) + implicit def baz2bar(x: Baz)(implicit foo2bar: Foo => Bar): Bar = foo2bar(new Foo) + + val x: Bar = new Foo + val y: Bar = new Baz +} |