diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-22 18:34:00 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-22 18:58:18 +0100 |
commit | 6ed666c4be5bc4904c926a265d711b85f729d4b3 (patch) | |
tree | bfd51f640ecd89eb3a6d111213747af77c68dde2 /src/dotty/tools/dotc/ast/TreeInfo.scala | |
parent | 108be8880688653de490975f29f6ae469e9f3e6a (diff) | |
download | dotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.tar.gz dotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.tar.bz2 dotty-6ed666c4be5bc4904c926a265d711b85f729d4b3.zip |
Typing by-name parameters with ExprTypes.
To avoid duplication between by-name parameters and expr types, we treat by-name parameters as as having ExprType. A part of this is introducing ByNameTypeTree, a specific tree class for => T types.
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/TreeInfo.scala | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index 0d3f1970f..29ff492d4 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -176,13 +176,6 @@ trait TreeInfo[T >: Untyped] { self: Trees.Instance[T] => case _ => false } - /** Is tpt a by-name parameter type of the form => T? */ - def isByNameParamType(tpt: Tree)(implicit ctx: Context) = tpt match { - case tpt: TypeTree => tpt.typeOpt isRef defn.ByNameParamClass - case AppliedTypeTree(Select(_, tpnme.BYNAME_PARAM_CLASS), _) => true - case _ => false - } - /** Is name a left-associative operator? */ def isLeftAssoc(operator: Name) = operator.nonEmpty && (operator.last != ':') |