File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -635,7 +635,7 @@ object desugar {
635635 ValDef (vparam.name, vparam.tpt, vparam.rhs)
636636 .withSpan(vparam.span)
637637 .withAttachmentsFrom(vparam)
638- .withMods(mods & (GivenOrImplicit | Erased | hasDefault | Tracked ) | Param )
638+ .withMods(mods & (GivenOrImplicit | Erased | hasDefault | Tracked | FromImplicit ) | Param )
639639 }
640640
641641 /** Desugar type def (not param): Under x.moduliity this can expand
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ object NamerOps:
6363 if ! isConstructor then paramss
6464 else paramss match
6565 case TypeSymbols (tparams) :: paramss1 => tparams :: normalizeIfConstructor(paramss1, isConstructor)
66- case TermSymbols (vparam :: _) :: _ if vparam.is(Implicit ) => Nil :: paramss
66+ case TermSymbols (vparam :: _) :: _ if vparam.is(Implicit ) || vparam.is( FromImplicit ) => Nil :: paramss
6767 case _ =>
6868 if paramss.forall {
6969 case TermSymbols (vparams) => vparams.nonEmpty && vparams.head.is(Given )
Original file line number Diff line number Diff line change @@ -6,3 +6,7 @@ def bar()(implicit a: Int) : Unit = ???
66def main () =
77 foo(0 )
88 bar()(0 )
9+
10+ class Foo (implicit hashA : Int ):
11+ // added empty param list, works only for implicits
12+ def this (o : Int , h : Int ) = this ()(h)
You can’t perform that action at this time.
0 commit comments