Skip to content

FullParameterization loses type parameter bounds #522

Closed
@smarter

Description

@smarter

This is the same issue than SI-6482 and SI-7022 which were fixed by scala/scala#1468, for example:

final class TraversableOnceOps[+A](val collection: TraversableOnce[A]) extends AnyVal {
  def reduceLeftOption[B >: A](op: (B, A) => B): Option[B] =
    if (collection.isEmpty) None else Some(collection.reduceLeft[B](op))
}

If ran with Ycheck, will fail with Type argument B does not conform to lower bound A:

> run -Ycheck:extmethods try/t6482a.scala
[info] Running dotty.tools.dotc.Main -Ycheck:extmethods try/t6482a.scala
[info] checking try/t6482a.scala after phase TreeTransform:{refchecks, elimRepeated, normalizeFlags, extmethods}
[info] exception while typing Some.apply[B]($this.collection.reduceLeft[B](op)) of class class dotty.tools.dotc.ast.Trees$Apply # 281
[info] exception while typing if $this.collection.isEmpty then None else 
[info]   Some.apply[B]($this.collection.reduceLeft[B](op)) of class class dotty.tools.dotc.ast.Trees$If # 282
[info] exception while typing final def reduceLeftOption$extension[B >: TraversableOnceOps$$A, A](
[info]   $this: TraversableOnceOps[A]
[info] )(op: (B, A) => B): Option[B] = 
[info]   if $this.collection.isEmpty then None else 
[info]     Some.apply[B]($this.collection.reduceLeft[B](op)) of class class dotty.tools.dotc.ast.Trees$DefDef # 283
[info] exception while typing final module class TraversableOnceOps$() extends Object() { 
[info]   this: TraversableOnceOps.type =>
[info]  
[info]   final def reduceLeftOption$extension[B >: TraversableOnceOps$$A, A](
[info]     $this: TraversableOnceOps[A]
[info]   )(op: (B, A) => B): Option[B] = 
[info]     if $this.collection.isEmpty then None else 
[info]       Some.apply[B]($this.collection.reduceLeft[B](op))
[info]   override final def hashCode$extension[A]($this: TraversableOnceOps[A])(): Int
[info]      = 
[info]   $this.collection.hashCode()
[info]   override final def equals$extension[A]($this: TraversableOnceOps[A])(x$0: Any)
[info]     : 
[info]   Boolean = 
[info]     x$0 match {
[info]       case x$0 @ _: TraversableOnceOps => $this.collection.==(x$0.collection)
[info]       case _: Any => false
[info]     }
[info] } of class class dotty.tools.dotc.ast.Trees$TypeDef # 342
[info] exception while typing package <empty> {
[info]   final class TraversableOnceOps[A](
[info]     collection: scala.collection.TraversableOnce[A]
[info]   ) extends AnyVal() { 
[info]     type TraversableOnceOps$$A
[info]     private type A =+ TraversableOnceOps$$A
[info]     val collection: scala.collection.TraversableOnce[TraversableOnceOps$$A]
[info]     def reduceLeftOption[B >: TraversableOnceOps$$A](
[info]       op: (B, TraversableOnceOps$$A) => B
[info]     ): Option[B] = 
[info]       TraversableOnceOps.reduceLeftOption$extension[B, TraversableOnceOps$$A](
[info]         this
[info]       )(op)
[info]     override def hashCode(): Int = 
[info]       TraversableOnceOps.hashCode$extension[TraversableOnceOps$$A](this)()
[info]     override def equals(x$0: Any): Boolean = 
[info]       TraversableOnceOps.equals$extension[TraversableOnceOps$$A](this)(x$0)
[info]   }
[info]   final lazy module val TraversableOnceOps: TraversableOnceOps$ = 
[info]     new TraversableOnceOps$()
[info]   final module class TraversableOnceOps$() extends Object() { 
[info]     this: TraversableOnceOps.type =>
[info]    
[info]     final def reduceLeftOption$extension[B >: TraversableOnceOps$$A, A](
[info]       $this: TraversableOnceOps[A]
[info]     )(op: (B, A) => B): Option[B] = 
[info]       if $this.collection.isEmpty then None else 
[info]         Some.apply[B]($this.collection.reduceLeft[B](op))
[info]     override final def hashCode$extension[A]($this: TraversableOnceOps[A])(): 
[info]       Int
[info]      = $this.collection.hashCode()
[info]     override final def equals$extension[A]($this: TraversableOnceOps[A])(
[info]       x$0: Any
[info]     ): Boolean = 
[info]       x$0 match {
[info]         case x$0 @ _: TraversableOnceOps => $this.collection.==(x$0.collection)
[info]         case _: Any => false
[info]       }
[info]   }
[info] } of class class dotty.tools.dotc.ast.Trees$PackageDef # 343
[info] *** error while checking after phase extmethods ***
[info] exception occurred while compiling List(try/t6482a.scala)%, %
[error] Exception in thread "main" class dotty.tools.dotc.reporting.Reporter$Error at try/t6482a.scala:3: Type argument B does not conform to lower bound A 
[error]         at dotty.tools.dotc.reporting.Reporting$class.error(Reporter.scala:99)
[error]         at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Checking$$anonfun$checkBounds$2.apply(Checking.scala:38)
[error]         at dotty.tools.dotc.typer.Checking$$anonfun$checkBounds$2.apply(Checking.scala:37)
[error]         at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778)
[error]         at scala.collection.immutable.List.foreach(List.scala:381)
[error]         at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:777)
[error]         at dotty.tools.dotc.typer.Checking$.checkBounds(Checking.scala:37)
[error]         at dotty.tools.dotc.typer.Checking$class.checkBounds(Checking.scala:248)
[error]         at dotty.tools.dotc.typer.Typer.checkBounds(Typer.scala:58)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$typedTypeApply$1.apply(Applications.scala:596)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$typedTypeApply$1.apply(Applications.scala:585)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Applications$class.typedTypeApply(Applications.scala:585)
[error]         at dotty.tools.dotc.typer.Typer.typedTypeApply(Typer.scala:58)
[error]         at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1054)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1125)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:516)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:512)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Applications$class.realApply$1(Applications.scala:512)
[error]         at dotty.tools.dotc.typer.Applications$class.typedApply(Applications.scala:578)
[error]         at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:58)
[error]         at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1038)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:201)
[error]         at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:495)
[error]         at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:493)
[error]         at dotty.tools.dotc.typer.Applications$Application.dotty$tools$dotc$typer$Applications$Application$$addTyped$1(Applications.scala:309)
[error]         at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:341)
[error]         at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:185)
[error]         at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:418)
[error]         at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:494)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1$$anonfun$apply$1.apply(Applications.scala:531)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1$$anonfun$apply$1.apply(Applications.scala:528)
[error]         at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:1133)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:534)
[error]         at dotty.tools.dotc.typer.Applications$$anonfun$realApply$1$1.apply(Applications.scala:512)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Applications$class.realApply$1(Applications.scala:512)
[error]         at dotty.tools.dotc.typer.Applications$class.typedApply(Applications.scala:578)
[error]         at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:58)
[error]         at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1038)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedIf$1.apply(Typer.scala:495)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedIf$1.apply(Typer.scala:492)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Typer.typedIf(Typer.scala:492)
[error]         at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1047)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1125)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:892)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedDefDef$1.apply(Typer.scala:885)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:885)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.dotty$tools$dotc$transform$TreeChecker$Checker$$super$typedDefDef(TreeChecker.scala:262)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$typedDefDef$1$$anonfun$apply$3.apply(TreeChecker.scala:262)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$typedDefDef$1$$anonfun$apply$3.apply(TreeChecker.scala:262)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:105)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:105)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSym(TreeChecker.scala:152)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSyms(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSymss$1.apply(TreeChecker.scala:163)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSymss$1.apply(TreeChecker.scala:163)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:105)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSym(TreeChecker.scala:152)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSyms(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSymss$1.apply(TreeChecker.scala:163)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSymss$1.apply(TreeChecker.scala:163)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSymss(TreeChecker.scala:163)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$typedDefDef$1.apply(TreeChecker.scala:261)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$typedDefDef$1.apply(TreeChecker.scala:261)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:105)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSym(TreeChecker.scala:152)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$$anonfun$foldRightBN$extension$1.apply(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSym(TreeChecker.scala:152)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker$$anonfun$withDefinedSyms$1.apply(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.core.Decorators$ListDecorator$.foldRightBN$extension(Decorators.scala:106)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.withDefinedSyms(TreeChecker.scala:160)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedDefDef(TreeChecker.scala:260)
[error]         at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1026)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1076)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1110)
[error]         at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1121)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedStats(TreeChecker.scala:288)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:922)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedClassDef$1.apply(Typer.scala:904)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:904)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedClassDef(TreeChecker.scala:256)
[error]         at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1029)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1076)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1110)
[error]         at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1121)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedStats(TreeChecker.scala:288)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:969)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typedPackageDef$1.apply(Typer.scala:960)
[error]         at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
[error]         at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:960)
[error]         at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1066)
[error]         at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1078)
[error]         at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:93)
[error]         at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:179)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1088)
[error]         at dotty.tools.dotc.typer.Typer$$anonfun$typed$2.apply(Typer.scala:1086)
[error]         at dotty.tools.dotc.reporting.Reporting$class.traceIndented(Reporter.scala:147)
[error]         at dotty.tools.dotc.core.Contexts$Context.traceIndented(Contexts.scala:51)
[error]         at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1086)
[error]         at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1125)
[error]         at dotty.tools.dotc.transform.TreeChecker.check(TreeChecker.scala:113)
[error]         at dotty.tools.dotc.transform.TreeChecker.run(TreeChecker.scala:91)
[error]         at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:268)
[error]         at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:266)
[error]         at scala.collection.immutable.List.map(List.scala:273)
[error]         at dotty.tools.dotc.core.Phases$Phase$class.runOn(Phases.scala:266)
[error]         at dotty.tools.dotc.transform.TreeChecker.runOn(TreeChecker.scala:38)
[error]         at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:59)
[error]         at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:56)
[error]         at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
[error]         at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
[error]         at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:56)
[error]         at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:52)
[error]         at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:52)
[error]         at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:68)
[error]         at dotty.tools.dotc.Run.compileUnits(Run.scala:52)
[error]         at dotty.tools.dotc.Run.compileSources(Run.scala:49)
[error]         at dotty.tools.dotc.Run.compile(Run.scala:33)
[error]         at dotty.tools.dotc.Driver.doCompile(Driver.scala:20)
[error]         at dotty.tools.dotc.Main$.doCompile(Main.scala:26)
[error]         at dotty.tools.dotc.Driver.process(Driver.scala:31)
[error]         at dotty.tools.dotc.Driver.main(Driver.scala:40)
[error]         at dotty.tools.dotc.Main.main(Main.scala)

This can also be reproduced with run -Ycheck:extmethods tests/pending/pos/t6482.scala and run -Ycheck:extmethods tests/pending/pos/t7022.scala

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions