summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala b/src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala
index 596091f75d..afafdedce7 100644
--- a/src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala
+++ b/src/compiler/scala/tools/nsc/transform/TypeAdaptingTransformer.scala
@@ -118,8 +118,7 @@ trait TypeAdaptingTransformer { self: TreeDSL =>
val needsExtraCast = isPrimitiveValueType(tree.tpe.typeArgs.head) && !isPrimitiveValueType(pt.typeArgs.head)
val tree1 = if (needsExtraCast) gen.mkRuntimeCall(nme.toObjectArray, List(tree)) else tree
gen.mkAttributedCast(tree1, pt)
- } else if (samMatchingFunction(tree, pt).exists) tree setType pt // SAM <:< FunctionN if sam is convertible to said function
- else gen.mkAttributedCast(tree, pt)
+ } else gen.mkAttributedCast(tree, pt)
}
/** Adapt `tree` to expected type `pt`.