diff options
author | michelou <michelou@epfl.ch> | 2008-06-10 11:04:21 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2008-06-10 11:04:21 +0000 |
commit | 6036fb15c628848599ef6f5990cacb8d8a6250b3 (patch) | |
tree | 4c82f82a71bad149b57727b32464a1ca92657e5f /test/files/pos/bug616.scala | |
parent | 68f0566419ddb6c22832081ac508e796853694ed (diff) | |
download | scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.tar.gz scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.tar.bz2 scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.zip |
int -> Int, etc..
Diffstat (limited to 'test/files/pos/bug616.scala')
-rw-r--r-- | test/files/pos/bug616.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/files/pos/bug616.scala b/test/files/pos/bug616.scala index bf757a58d3..bb91c732a6 100644 --- a/test/files/pos/bug616.scala +++ b/test/files/pos/bug616.scala @@ -1,11 +1,11 @@ object testImplicit { - implicit def foo2bar(foo :Foo) :Bar = foo.bar - class Foo(val bar :Bar) { - def testCoercion = {val a = this; a.baz} // here, foo2bar is inferred by the compiler, as expected - //def testCoercionThisImplicit = baz // --> error: not found: value baz - def testCoercionThisExplicit: Any = this.baz // --> error: value baz is not a member of Foo - } - trait Bar { def baz :unit} + implicit def foo2bar(foo: Foo): Bar = foo.bar + class Foo(val bar: Bar) { + def testCoercion = {val a = this; a.baz} // here, foo2bar is inferred by the compiler, as expected + //def testCoercionThisImplicit = baz // --> error: not found: value baz + def testCoercionThisExplicit: Any = this.baz // --> error: value baz is not a member of Foo + } + trait Bar { def baz: Unit } } // mentioned before: http://thread.gmane.org/gmane.comp.lang.scala/2038, // but couldn't find a bug report |