[Assorted-commits] SF.net SVN: assorted: [346] sandbox/trunk/src/scala/MissingParamTypeBug. scala
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-10 03:11:32
|
Revision: 346 http://assorted.svn.sourceforge.net/assorted/?rev=346&view=rev Author: yangzhang Date: 2008-02-09 19:11:37 -0800 (Sat, 09 Feb 2008) Log Message: ----------- added small bug Added Paths: ----------- sandbox/trunk/src/scala/MissingParamTypeBug.scala Added: sandbox/trunk/src/scala/MissingParamTypeBug.scala =================================================================== --- sandbox/trunk/src/scala/MissingParamTypeBug.scala (rev 0) +++ sandbox/trunk/src/scala/MissingParamTypeBug.scala 2008-02-10 03:11:37 UTC (rev 346) @@ -0,0 +1,13 @@ +// Results in the following compile error: +// +// MissingParamTypeBug.scala:4: error: missing parameter type +// for ((name,size) <- s toArray) println(name) +// ^ +// one error found +// +object MissingParramTypeBug { + def main(args: Array[String]) { + val s = List("a","b").toStream + for ((name,size) <- s toArray) println(name) + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |