summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorIngo Maier <ingo.maier@epfl.ch>2009-03-31 13:38:18 +0000
committerIngo Maier <ingo.maier@epfl.ch>2009-03-31 13:38:18 +0000
commita464ed4c3a8cddc200e38e8882026eb1ca5de7d9 (patch)
tree9accc54853444fe64eeabb39f7562dd447855f41 /src/compiler
parent3b25ed4bb51947b86822be323ffdf808151cfc8d (diff)
downloadscala-a464ed4c3a8cddc200e38e8882026eb1ca5de7d9.tar.gz
scala-a464ed4c3a8cddc200e38e8882026eb1ca5de7d9.tar.bz2
scala-a464ed4c3a8cddc200e38e8882026eb1ca5de7d9.zip
Removed all traces of ByNameFunction
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala7
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala6
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala3
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala12
4 files changed, 0 insertions, 28 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index c1c5e26d3d..cfa91371fc 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -722,13 +722,6 @@ trait Parsers extends NewScanners with MarkupParsers {
if (inToken == RPAREN) {
inNextToken
atPos(accept(ARROW)) { makeFunctionTypeTree(List(), typ(isPattern)) }
- /* Not more used
- } else if (inToken == ARROW) {
- inNextToken
- val t0 = typ(isPattern)
- accept(RPAREN)
- atPos(accept(ARROW)) { makeByNameFunctionTypeTree(t0, typ(isPattern)) }
- */
} else {
val ts = types(isPattern, false, true)
accept(RPAREN)
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
index ee32434612..43a667f16c 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -426,12 +426,6 @@ abstract class TreeBuilder {
def makeFunctionTypeTree(argtpes: List[Tree], restpe: Tree): Tree =
AppliedTypeTree(scalaDot(newTypeName("Function" + argtpes.length)), argtpes ::: List(restpe))
- /** Create a tree representing a the name function type (=> argtpe) => restpe */
- /*
- def makeByNameFunctionTypeTree(argtpe: Tree, restpe: Tree): Tree =
- AppliedTypeTree(scalaDot(newTypeName("ByNameFunction")), List(argtpe, restpe))
- */
-
/** Append implicit view section if for `implicitViews' if nonempty */
def addImplicitViews(owner: Name, vparamss: List[List[ValDef]], implicitViews: List[Tree]): List[List[ValDef]] = {
val mods = Modifiers(if (owner.isTypeName) PARAMACCESSOR | LOCAL | PRIVATE else PARAM)
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 4f2e07166f..188eeb8e49 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -103,9 +103,6 @@ trait Definitions {
var CodeModule: Symbol = _
def Code_lift = getMember(CodeModule, nme.lift_)
lazy val PartialFunctionClass: Symbol = getClass("scala.PartialFunction")
- /*
- lazy val ByNameFunctionClass: Symbol = getClass("scala.ByNameFunction")
- */
lazy val IterableClass: Symbol = getClass2("scala.Iterable", "scala.collection.Iterable")
def Iterable_next = getMember(IterableClass, nme.next)
def Iterable_hasNext = getMember(IterableClass, nme.hasNext)
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index f3c2bc3122..e793fb463a 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -63,11 +63,6 @@ abstract class UnCurry extends InfoTransform with TypingTransformers {
apply(MethodType(List(), restpe))
case PolyType(tparams, restpe) =>
PolyType(tparams, apply(MethodType(List(), restpe)))
- /*
- case TypeRef(pre, sym, List(arg1, arg2)) if (arg1.typeSymbol == ByNameParamClass) =>
- assert(sym == FunctionClass(1))
- apply(typeRef(pre, definitions.ByNameFunctionClass, List(expandAlias(arg1.typeArgs(0)), arg2)))
- */
case TypeRef(pre, sym, List(arg)) if (sym == ByNameParamClass) =>
apply(functionType(List(), arg))
case TypeRef(pre, sym, args) if (sym == RepeatedParamClass) =>
@@ -620,13 +615,6 @@ abstract class UnCurry extends InfoTransform with TypingTransformers {
assert(name != nme.WILDCARD_STAR.toTypeName)
applyUnary(tree);
case Select(qual, name) =>
- /* Function1.apply to ByNameFunction.apply if qualifier is a ByNameFunction */
- /*
- if (qual.tpe.typeSymbol == ByNameFunctionClass) {
- assert(tree.symbol.name == nme.apply && tree.symbol.owner == FunctionClass(1), tree.symbol)
- tree.symbol = getMember(ByNameFunctionClass, nme.apply)
- }
- */
applyUnary(tree)
case TypeApply(_, _) =>
applyUnary(tree)