Skip to content

Commit 7a446fa

Browse files
committed
Circumvent Dotty issue with default argument in curried superconstructors
1 parent f4266b4 commit 7a446fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ object ProtoTypes {
211211
trait ApplyingProto extends ProtoType
212212

213213
class FunProtoState {
214-
214+
215215
/** The list of typed arguments, if all arguments are typed */
216216
var typedArgs: List[Tree] = Nil
217217

@@ -402,7 +402,7 @@ object ProtoTypes {
402402
}
403403

404404
class UnapplyFunProto(argType: Type, typer: Typer)(implicit ctx: Context) extends FunProto(
405-
untpd.TypedSplice(dummyTreeOfType(argType))(ctx) :: Nil, WildcardType)(typer)
405+
untpd.TypedSplice(dummyTreeOfType(argType))(ctx) :: Nil, WildcardType)(typer, new FunProtoState()) // TODO: Investigate Dotty failure with default param
406406

407407
/** A prototype for expressions [] that are type-parameterized:
408408
*

0 commit comments

Comments
 (0)