diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-10 00:55:15 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-10 00:55:15 +0000 |
commit | 879e5af47db2ae6807aef26dd786e6ea920ac554 (patch) | |
tree | 7aecb05e2c9361689c16dec2a2c8473af6d0b4fd /src/msil/ch/epfl | |
parent | e3e64e43659f53dd8f9cd5837f78a7e4378dc4c4 (diff) | |
download | scala-879e5af47db2ae6807aef26dd786e6ea920ac554.tar.gz scala-879e5af47db2ae6807aef26dd786e6ea920ac554.tar.bz2 scala-879e5af47db2ae6807aef26dd786e6ea920ac554.zip |
Reversed the values of "is" and "is not" in rec...
Reversed the values of "is" and "is not" in recent for comprehension
deprecation.
DO NOT BLOW HATCH
REPEAT
DO NOT BLOW HATCH
"Roger! Hatch blown."
Events reveal it was all baby, no bathwater. It turns out that the
specification is merely a document, not infallible holy writ as we
had all previously believed. So it is not the ABSENCE of val in a for
comprehension assignment which is deprecated, it is the PRESENCE of val.
Summarizing again, more accurately perhaps:
for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one
for (val x <- 1 to 5 ; y = x) yield x+y // fail
for (val x <- 1 to 5 ; val y = x) yield x+y // fail
for (x <- 1 to 5 ; val y = x) yield x+y // deprecated
No review.
Diffstat (limited to 'src/msil/ch/epfl')
3 files changed, 11 insertions, 11 deletions
diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala index 43333ef825..55c52109b6 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala @@ -43,12 +43,12 @@ final class MultipleFilesILPrinterVisitor(destPath: String, sourceFilesPath: Str // print each module var m: Array[Module] = assemblyBuilder.GetModules() nomembers = true - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[ModuleBuilder]) } nomembers = false - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[ModuleBuilder]) } ILPrinterVisitor.currAssembly = null @@ -72,7 +72,7 @@ final class MultipleFilesILPrinterVisitor(destPath: String, sourceFilesPath: Str // "Types" contain all the classes var t: Array[Type] = module.GetTypes() - for(val i <- 0 until t.length) { + for(i <- 0 until t.length) { val tBuilder = t(i).asInstanceOf[TypeBuilder] val sourceFilename = tBuilder.sourceFilename val sourceFilepath = new File(tBuilder.sourceFilepath).getCanonicalPath @@ -124,7 +124,7 @@ final class MultipleFilesILPrinterVisitor(destPath: String, sourceFilesPath: Str printAttributes(module) } - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[MethodBuilder]) } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala index 0f2e7d7ecf..5d59d4d25a 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala @@ -50,12 +50,12 @@ final class SingleFileILPrinterVisitor(_fileName: String) extends ILPrinterVisit // print each module var m: Array[Module] = assemblyBuilder.GetModules() nomembers = true - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[ModuleBuilder]) } nomembers = false - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[ModuleBuilder]) } // close out file @@ -79,12 +79,12 @@ final class SingleFileILPrinterVisitor(_fileName: String) extends ILPrinterVisit module.CreateGlobalFunctions() var m: Array[MethodInfo] = module.GetMethods() - for(val i <- 0 until m.length) { + for(i <- 0 until m.length) { print(m(i).asInstanceOf[MethodBuilder]) } var t: Array[Type] = module.GetTypes() - for(val i <- 0 until t.length) { + for(i <- 0 until t.length) { print(t(i).asInstanceOf[TypeBuilder]) } currentModule = null diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala index 5126a0c34d..57dc883898 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/TypeBuilder.scala @@ -222,7 +222,7 @@ class TypeBuilder (module: Module, attributes: Int, fullName: String, baseType: object TypeBuilder { def types2String(types: Array[Type]): String = { var s = new StringBuffer("(") - for(val i <- 0 until types.length) { + for(i <- 0 until types.length) { if (i > 0) s.append(", ") s.append(types(i)) } @@ -239,7 +239,7 @@ object TypeBuilder { val p2 = m2.GetParameters() if (p1.length != p2.length) return false - for(val i <- 0 until p1.length) + for(i <- 0 until p1.length) if (p1(i).ParameterType != p2(i).ParameterType) return false return true @@ -252,7 +252,7 @@ object TypeBuilder { val p2 = c2.GetParameters() if (p1.length != p2.length) return false - for(val i <- 0 until p1.length) + for(i <- 0 until p1.length) if (p1(i).ParameterType != p2(i).ParameterType) return false return true |