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 {
635
635
ValDef (vparam.name, vparam.tpt, vparam.rhs)
636
636
.withSpan(vparam.span)
637
637
.withAttachmentsFrom(vparam)
638
- .withMods(mods & (GivenOrImplicit | Erased | hasDefault | Tracked ) | Param )
638
+ .withMods(mods & (GivenOrImplicit | Erased | hasDefault | Tracked | FromImplicit ) | Param )
639
639
}
640
640
641
641
/** 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:
63
63
if ! isConstructor then paramss
64
64
else paramss match
65
65
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
67
67
case _ =>
68
68
if paramss.forall {
69
69
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 = ???
6
6
def main () =
7
7
foo(0 )
8
8
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