Skip to content

Commit 6f3b64d

Browse files
author
EnzeXing
committed
Accommodate polymorphic methods
1 parent 03f2d30 commit 6f3b64d

File tree

1 file changed

+4
-0
lines changed
  • compiler/src/dotty/tools/dotc/transform/init

1 file changed

+4
-0
lines changed

compiler/src/dotty/tools/dotc/transform/init/Util.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ object Util:
6262
case ref: RefTree if ref.symbol.is(Flags.Method) =>
6363
Some((ref, Nil))
6464

65+
case ref: RefTree if ref.tpe.widenSingleton.isInstanceOf[MethodicType] =>
66+
// for polymorphic method with no `apply` symbol; see tests/init/pos/interleaving-overload.scala
67+
Some((ref, Nil))
68+
6569
case _ => None
6670

6771
object NewExpr:

0 commit comments

Comments
 (0)