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 | |
parent | 68f0566419ddb6c22832081ac508e796853694ed (diff) | |
download | scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.tar.gz scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.tar.bz2 scala-6036fb15c628848599ef6f5990cacb8d8a6250b3.zip |
int -> Int, etc..
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/bug616.scala | 14 | ||||
-rw-r--r-- | test/files/pos/unapplyComplex.scala | 6 |
2 files changed, 10 insertions, 10 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 diff --git a/test/files/pos/unapplyComplex.scala b/test/files/pos/unapplyComplex.scala index 54080eb86f..886e265978 100644 --- a/test/files/pos/unapplyComplex.scala +++ b/test/files/pos/unapplyComplex.scala @@ -1,10 +1,10 @@ -trait Complex extends Product2[double,double] +trait Complex extends Product2[Double, Double] -class ComplexRect(val _1:double, val _2:double) extends Complex { +class ComplexRect(val _1: Double, val _2: Double) extends Complex { override def toString = "ComplexRect("+_1+","+_2+")" } -class ComplexPolar(val _1:double, val _2:double) extends Complex { +class ComplexPolar(val _1: Double, val _2: Double) extends Complex { override def toString = "ComplexPolar("+_1+","+_2+")" } |