aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-02 14:13:15 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-06 16:09:20 +0100
commit67d28339d91f912c2894a05110d713f077458feb (patch)
tree645002e9b555a91eaf1861be156a45982d5fcc9c
parente14be2d90f330835af86e85b2bca97a6d1b7cf06 (diff)
downloaddotty-67d28339d91f912c2894a05110d713f077458feb.tar.gz
dotty-67d28339d91f912c2894a05110d713f077458feb.tar.bz2
dotty-67d28339d91f912c2894a05110d713f077458feb.zip
Drop redundant check in beta reduce
-rw-r--r--src/dotty/tools/dotc/core/Types.scala10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 566268455..84d74b0f4 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -883,12 +883,10 @@ object Types {
instantiate(tp)
}
/** Reduce rhs of $hkApply to make it stand alone */
- def betaReduce(tp: Type) =
- if (pre.parent.isSafeLambda) {
- val reduced = instTop(tp)
- if (instantiate.isSafe) reduced else NoType
- }
- else NoType
+ def betaReduce(tp: Type) = {
+ val reduced = instTop(tp)
+ if (instantiate.isSafe) reduced else NoType
+ }
pre.refinedInfo match {
case TypeAlias(alias) =>
if (pre.refinedName ne name) loop(pre.parent)