Skip to content

index tuple out of range causes crash but should have found Match type reduction failed #15301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
peter-shook opened this issue May 27, 2022 · 0 comments · Fixed by #15320
Closed

Comments

@peter-shook
Copy link

peter-shook commented May 27, 2022

Compiler version

scalac -version
Scala compiler version 3.1.2 -- Copyright 2002-2022, LAMP/EPFL

java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)

Minimized code

package theproblem

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.ExecutionContext.Implicits.global

object Items:
  opaque type TheId = Int
  extension (TheId: TheId) def raw: Int = TheId

  object TheId:
    def apply(id: Int): TheId = id


import Items.TheId

case class AnError(id: TheId)

type ErrAcc[A] = Either[Seq[AnError], A]

case class Res[A](future: Future[ErrAcc[A]]):

  def map[B](f: A => B)(using ExecutionContext): Res[B] =
    Res(this.future.map(_.map(f)))

  def flatMap[B](f: A => Res[B])(using ExecutionContext): Res[B] =
    Res(this.future.flatMap {
      case Right(x) => f(x).future
      case Left(es) => Future.successful(Left[Seq[AnError], B](es))
    })

  def zip[B](that: Res[B])(using ExecutionContext): Res[(A, B)] =
    def zipacc(a: ErrAcc[A], b: ErrAcc[B]): ErrAcc[(A, B)] = (a, b) match
      case (Right(x), Right(y)) => Right((x, y))
      case (Right(_), Left(e) ) => Left(e)
      case (Left(e),  Right(_)) => Left(e)
      case (Left(ex), Left(ey)) => Left(ex ++ ey)

    Res(this.future.flatMap { a => that.future.map { b => zipacc(a, b) } })

object Res:
  def successful[A](x: A): Res[A] = Res(Future.successful(Right[Seq[AnError], A](x)))

  def traverse[A, B](as: Seq[A])(f: A => Res[B])(using ExecutionContext): Res[Seq[B]] =
    as.foldLeft[Res[Seq[B]]](successful(Seq.empty)) { (acc, x) => acc.zip(f(x)).map(_ :+ _) }

trait M:
  def getID(name: String)(using ExecutionContext): Res[TheId]
  def bfs(sid: TheId, tid: TheId): Res[Boolean]

class theproblem(m: M):

  def thebug(names: List[String]): Res[Seq[(String, String, Boolean)]] =
    Res.traverse(names)(m.getID).flatMap { ids =>
      val id_names = ids.zip(names)
      val ps = for {
        (sid, sname) <- id_names
        (tid, tname) <- id_names
        if sid != tid
      } yield (sid -> sname, tid -> tname)
      Res.traverse(ps){ (s, t) =>
        m.bfs(s(0), t(0)).map((s(1), t(2), _))  // t(2) should be t(1)
      }
    }

Output (click arrow to expand)

This is the expected error which is not an issue in 3.1.1, but crashes 3.1.2
-- Error: x5.scala:68:38 -----------
68 |        m.bfs(s(0), t(0)).map((s(1), t(2), _))  // t(2) should be t(1)
   |                                      ^
   |      Match type reduction failed since selector  EmptyTuple.type
   |      matches none of the cases
   |
   |          case x *: xs => (0 : Int) match {
   |        case (0 : Int) => x
   |        case scala.compiletime.ops.int.S[n1] => scala.Tuple.Elem[xs, n1]
   |      }
1 errors found
Error: Errors encountered during compilation
$ scala x5.scala 
exception occurred while typechecking x5.scala
exception occurred while compiling x5.scala
java.lang.AssertionError: assertion failed: Number(2,Whole(10)) while compiling x5.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: Number(2,Whole(10))
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldMoreCases(Trees.scala:1629)
	at dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1624)
	at dotty.tools.dotc.ast.tpd$$anon$5.apply(tpd.scala:1090)
	at dotty.tools.dotc.ast.tpd$$anon$5.apply(tpd.scala:1090)
	at dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1515)
	at dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1517)
	at dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1534)
	at dotty.tools.dotc.ast.tpd$$anon$5.apply(tpd.scala:1090)
	at dotty.tools.dotc.ast.tpd$$anon$5.apply(tpd.scala:1090)
	at dotty.tools.dotc.ast.tpd$TreeOps$.existsSubTree$extension(tpd.scala:1092)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.hasInnerErrors(ProtoTypes.scala:369)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:388)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:463)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:852)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1052)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:119)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:898)
	at dotty.tools.dotc.typer.Applications.realApply$1$$anonfun$3(Applications.scala:978)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:3081)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:989)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1027)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:119)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2809)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedTuple(Typer.scala:2720)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2846)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.$anonfun$47(Typer.scala:2256)
	at dotty.tools.dotc.typer.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:238)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2256)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2786)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2871)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3013)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1069)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1073)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:1452)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1241)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2819)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:462)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:386)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:463)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:852)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1052)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:119)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:898)
	at dotty.tools.dotc.typer.Applications.realApply$1$$anonfun$3(Applications.scala:978)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:3081)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:989)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1027)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:119)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2809)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1075)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1075)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.$anonfun$47(Typer.scala:2256)
	at dotty.tools.dotc.typer.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:238)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2256)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2786)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2871)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3013)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1069)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1073)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:1452)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1241)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2819)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:1452)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1241)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2819)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1075)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:462)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:386)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:463)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:852)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1052)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:119)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:898)
	at dotty.tools.dotc.typer.Applications.realApply$1$$anonfun$3(Applications.scala:978)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:3081)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:989)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1027)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:119)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2809)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1075)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.$anonfun$47(Typer.scala:2256)
	at dotty.tools.dotc.typer.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:238)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2256)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2786)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2871)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3013)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1069)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1073)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:1452)
	at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1241)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2819)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1075)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2817)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:462)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:386)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:463)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:853)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:852)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1052)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:119)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:898)
	at dotty.tools.dotc.typer.Applications.realApply$1$$anonfun$3(Applications.scala:978)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:3081)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:989)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1027)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:119)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2809)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.Typer.$anonfun$47(Typer.scala:2256)
	at dotty.tools.dotc.typer.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:238)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2256)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2786)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2871)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3013)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2454)
	at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2797)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2801)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2871)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3013)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2581)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2842)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2872)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2937)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3057)
	at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:47)
	at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:411)
	at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:54)
	at dotty.tools.dotc.typer.TyperPhase.runOn$$anonfun$3(TyperPhase.scala:88)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.immutable.List.foreach(List.scala:333)
	at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:88)
	at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:259)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
	at dotty.tools.dotc.Run.runPhases$1(Run.scala:270)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:278)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:287)
	at dotty.tools.dotc.Run.compileSources(Run.scala:220)
	at dotty.tools.dotc.Run.compile(Run.scala:204)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
	at dotty.tools.scripting.ScriptingDriver.compileAndRun(ScriptingDriver.scala:21)
	at dotty.tools.scripting.Main$.main(Main.scala:43)
	at dotty.tools.MainGenericRunner$.run$1(MainGenericRunner.scala:248)
	at dotty.tools.MainGenericRunner$.main(MainGenericRunner.scala:267)
	at dotty.tools.MainGenericRunner.main(MainGenericRunner.scala)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at coursier.bootstrap.launcher.a.a(Unknown Source)
	at coursier.bootstrap.launcher.Launcher.main(Unknown Source)


@peter-shook peter-shook added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels May 27, 2022
@szymon-rd szymon-rd added area:typer and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 30, 2022
odersky added a commit to dotty-staging/dotty that referenced this issue May 30, 2022
bishabosha pushed a commit to dotty-staging/dotty that referenced this issue Oct 18, 2022
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants