Skip to content

Exception while typing [extremely long type here] #12194

Closed
@aka-bash0r

Description

@aka-bash0r

Compiler version

3.0.0-RC3

Minimized code

import scala.annotation.implicitNotFound
import scala.compiletime.package$package.summonAll
import scala.util.Try
import scala.util.Success
import scala.util.Failure
import scala.util.NotGiven
import scala.deriving.*

@main def hello(): Unit =
  println(summonAll[Tuple.Map[("foo", "bar"), ValueOf]].toList.map{
    case str: ValueOf[_]  str.value
  })

Output (click arrow to expand)

Crashes on build with sbt compile and from the IDE (stack trace is from IDE crash).

Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Searching for compilable files...
Reading compilation settings...
Compiling playground...
scalac: exception while typing {
  val Tuple_this: 
    (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
      scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
    )
   = 
    (
      {
        val res: Tuple = 
          {
            val x$2: ValueOf[("foo" : String)] = 
              {
                given val t: ValueOf[("foo" : String)] = 
                  new ValueOf[("foo" : String)]("foo")
                t:ValueOf[("foo" : String)]
              }
            {
              val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                {
                  val res: Tuple = 
                    {
                      val x$2: ValueOf[("bar" : String)] = 
                        {
                          given val t: ValueOf[("bar" : String)] = 
                            new ValueOf[("bar" : String)]("bar")
                          t:ValueOf[("bar" : String)]
                        }
                      {
                        val Tuple_this: EmptyTuple.type = EmptyTuple
                        runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                          ValueOf[("bar" : String)] *: EmptyTuple.type
                        ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                      }:Any *: Tuple
                    }
                  res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple]
                }:ValueOf[("bar" : String)] *: EmptyTuple
              runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
              ]:
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
            }:Any *: Tuple
          }
        res.asInstanceOf[
          ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
            scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
          
        ]
      }
    :
      ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
        scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
      
    )
  (
    Tuple_this.productIterator.toList.asInstanceOf[
      scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
    ]
  :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
}.map of class class dotty.tools.dotc.ast.Trees$Select # -1
scalac: exception while typing {
  val Tuple_this: 
    (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
      scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
    )
   = 
    (
      {
        val res: Tuple = 
          {
            val x$2: ValueOf[("foo" : String)] = 
              {
                given val t: ValueOf[("foo" : String)] = 
                  new ValueOf[("foo" : String)]("foo")
                t:ValueOf[("foo" : String)]
              }
            {
              val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                {
                  val res: Tuple = 
                    {
                      val x$2: ValueOf[("bar" : String)] = 
                        {
                          given val t: ValueOf[("bar" : String)] = 
                            new ValueOf[("bar" : String)]("bar")
                          t:ValueOf[("bar" : String)]
                        }
                      {
                        val Tuple_this: EmptyTuple.type = EmptyTuple
                        runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                          ValueOf[("bar" : String)] *: EmptyTuple.type
                        ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                      }:Any *: Tuple
                    }
                  res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple]
                }:ValueOf[("bar" : String)] *: EmptyTuple
              runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
              ]:
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
            }:Any *: Tuple
          }
        res.asInstanceOf[
          ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
            scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
          
        ]
      }
    :
      ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
        scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
      
    )
  (
    Tuple_this.productIterator.toList.asInstanceOf[
      scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
    ]
  :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
}.map[_] of class class dotty.tools.dotc.ast.Trees$TypeApply # -1
scalac: exception while typing {
  val Tuple_this: 
    (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
      scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
    )
   = 
    (
      {
        val res: Tuple = 
          {
            val x$2: ValueOf[("foo" : String)] = 
              {
                given val t: ValueOf[("foo" : String)] = 
                  new ValueOf[("foo" : String)]("foo")
                t:ValueOf[("foo" : String)]
              }
            {
              val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                {
                  val res: Tuple = 
                    {
                      val x$2: ValueOf[("bar" : String)] = 
                        {
                          given val t: ValueOf[("bar" : String)] = 
                            new ValueOf[("bar" : String)]("bar")
                          t:ValueOf[("bar" : String)]
                        }
                      {
                        val Tuple_this: EmptyTuple.type = EmptyTuple
                        runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                          ValueOf[("bar" : String)] *: EmptyTuple.type
                        ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                      }:Any *: Tuple
                    }
                  res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple]
                }:ValueOf[("bar" : String)] *: EmptyTuple
              runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
              ]:
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  EmptyTuple
                
            }:Any *: Tuple
          }
        res.asInstanceOf[
          ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
            scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
          
        ]
      }
    :
      ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
        scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
      
    )
  (
    Tuple_this.productIterator.toList.asInstanceOf[
      scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
    ]
  :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
}.map[_](
  {
    def $anonfun(
      x$1: 
        ValueOf[("foo" : String)] | 
          scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, Nothing, 
            [x, y] =>> x | y
          ]
        
    ): _ = 
      matchResult1[Object]: 
        {
          case val x1: (x$1 : Object) = x$1
          if x1.$isInstanceOf$[ValueOf[_] @_] then 
            {
              case val str: 
                ValueOf[("foo" : String)] & ValueOf[_] | 
                  scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                    Nothing
                  , [x, y] =>> x | y]
                 & ValueOf[_]
               = 
                x1.$asInstanceOf$[ValueOf[_] @_].$asInstanceOf$[
                  ValueOf[("foo" : String)] & ValueOf[_] | 
                    scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                      Nothing
                    , [x, y] =>> x | y]
                   & ValueOf[_]
                ]
              return[matchResult1] 
                {
                  str.value:_
                }
            }
           else ()
          throw new MatchError(x1)
        }
    closure($anonfun)
  }
) of class class dotty.tools.dotc.ast.Trees$Apply # -1
scalac: exception while typing println(
  {
    val Tuple_this: 
      (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
        scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
      )
     = 
      (
        {
          val res: Tuple = 
            {
              val x$2: ValueOf[("foo" : String)] = 
                {
                  given val t: ValueOf[("foo" : String)] = 
                    new ValueOf[("foo" : String)]("foo")
                  t:ValueOf[("foo" : String)]
                }
              {
                val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                  {
                    val res: Tuple = 
                      {
                        val x$2: ValueOf[("bar" : String)] = 
                          {
                            given val t: ValueOf[("bar" : String)] = 
                              new ValueOf[("bar" : String)]("bar")
                            t:ValueOf[("bar" : String)]
                          }
                        {
                          val Tuple_this: EmptyTuple.type = EmptyTuple
                          runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                            ValueOf[("bar" : String)] *: EmptyTuple.type
                          ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                        }:Any *: Tuple
                      }
                    res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple]
                  }:ValueOf[("bar" : String)] *: EmptyTuple
                runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                  ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                    EmptyTuple
                  
                ]:
                  ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                    EmptyTuple
                  
              }:Any *: Tuple
            }
          res.asInstanceOf[
            ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
              scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
            
          ]
        }
      :
        ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
          scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
        
      )
    (
      Tuple_this.productIterator.toList.asInstanceOf[
        scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
      ]
    :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
  }.map[_](
    {
      def $anonfun(
        x$1: 
          ValueOf[("foo" : String)] | 
            scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, Nothing, 
              [x, y] =>> x | y
            ]
          
      ): _ = 
        matchResult1[Object]: 
          {
            case val x1: (x$1 : Object) = x$1
            if x1.$isInstanceOf$[ValueOf[_] @_] then 
              {
                case val str: 
                  ValueOf[("foo" : String)] & ValueOf[_] | 
                    scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                      Nothing
                    , [x, y] =>> x | y]
                   & ValueOf[_]
                 = 
                  x1.$asInstanceOf$[ValueOf[_] @_].$asInstanceOf$[
                    ValueOf[("foo" : String)] & ValueOf[_] | 
                      scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                        Nothing
                      , [x, y] =>> x | y]
                     & ValueOf[_]
                  ]
                return[matchResult1] 
                  {
                    str.value:_
                  }
              }
             else ()
            throw new MatchError(x1)
          }
      closure($anonfun)
    }
  )
) of class class dotty.tools.dotc.ast.Trees$Apply # -1
scalac: exception while typing @main() def hello(): Unit = 
  println(
    {
      val Tuple_this: 
        (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
          scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
        )
       = 
        (
          {
            val res: Tuple = 
              {
                val x$2: ValueOf[("foo" : String)] = 
                  {
                    given val t: ValueOf[("foo" : String)] = 
                      new ValueOf[("foo" : String)]("foo")
                    t:ValueOf[("foo" : String)]
                  }
                {
                  val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                    {
                      val res: Tuple = 
                        {
                          val x$2: ValueOf[("bar" : String)] = 
                            {
                              given val t: ValueOf[("bar" : String)] = 
                                new ValueOf[("bar" : String)]("bar")
                              t:ValueOf[("bar" : String)]
                            }
                          {
                            val Tuple_this: EmptyTuple.type = EmptyTuple
                            runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                              ValueOf[("bar" : String)] *: EmptyTuple.type
                            ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                          }:Any *: Tuple
                        }
                      res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple]
                    }:ValueOf[("bar" : String)] *: EmptyTuple
                  runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                    ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                      EmptyTuple
                    
                  ]:
                    ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                      EmptyTuple
                    
                }:Any *: Tuple
              }
            res.asInstanceOf[
              ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
              
            ]
          }
        :
          ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
            scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
          
        )
      (
        Tuple_this.productIterator.toList.asInstanceOf[
          scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
        ]
      :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
    }.map[_](
      {
        def $anonfun(
          x$1: 
            ValueOf[("foo" : String)] | 
              scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, Nothing
                , 
              [x, y] =>> x | y]
            
        ): _ = 
          matchResult1[Object]: 
            {
              case val x1: (x$1 : Object) = x$1
              if x1.$isInstanceOf$[ValueOf[_] @_] then 
                {
                  case val str: 
                    ValueOf[("foo" : String)] & ValueOf[_] | 
                      scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                        Nothing
                      , [x, y] =>> x | y]
                     & ValueOf[_]
                   = 
                    x1.$asInstanceOf$[ValueOf[_] @_].$asInstanceOf$[
                      ValueOf[("foo" : String)] & ValueOf[_] | 
                        scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple
                          , 
                        Nothing, [x, y] =>> x | y]
                       & ValueOf[_]
                    ]
                  return[matchResult1] 
                    {
                      str.value:_
                    }
                }
               else ()
              throw new MatchError(x1)
            }
        closure($anonfun)
      }
    )
  ) of class class dotty.tools.dotc.ast.Trees$DefDef # -1
scalac: exception while typing @scala.annotation.internal.SourceFile(
  "C:\\Users\\User\\dev\\playground\\src\\main\\scala\\Main.scala"
) final module class Main$package$() extends Object() {
  private def writeReplace(): AnyRef = 
    new scala.runtime.ModuleSerializationProxy(classOf[Main$package.type])
  @main() def hello(): Unit = 
    println(
      {
        val Tuple_this: 
          (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
            scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
          )
         = 
          (
            {
              val res: Tuple = 
                {
                  val x$2: ValueOf[("foo" : String)] = 
                    {
                      given val t: ValueOf[("foo" : String)] = 
                        new ValueOf[("foo" : String)]("foo")
                      t:ValueOf[("foo" : String)]
                    }
                  {
                    val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                      {
                        val res: Tuple = 
                          {
                            val x$2: ValueOf[("bar" : String)] = 
                              {
                                given val t: ValueOf[("bar" : String)] = 
                                  new ValueOf[("bar" : String)]("bar")
                                t:ValueOf[("bar" : String)]
                              }
                            {
                              val Tuple_this: EmptyTuple.type = EmptyTuple
                              runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                                ValueOf[("bar" : String)] *: EmptyTuple.type
                              ]:ValueOf[("bar" : String)] *: EmptyTuple.type
                            }:Any *: Tuple
                          }
                        res.asInstanceOf[ValueOf[("bar" : String)] *: EmptyTuple
                          ]
                      }:ValueOf[("bar" : String)] *: EmptyTuple
                    runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                      ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                        EmptyTuple
                      
                    ]:
                      ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                        EmptyTuple
                      
                  }:Any *: Tuple
                }
              res.asInstanceOf[
                ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                  scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
                
              ]
            }
          :
            ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
              scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
            
          )
        (
          Tuple_this.productIterator.toList.asInstanceOf[
            scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]]
          ]
        :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
      }.map[_](
        {
          def $anonfun(
            x$1: 
              ValueOf[("foo" : String)] | 
                scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                  Nothing
                , [x, y] =>> x | y]
              
          ): _ = 
            matchResult1[Object]: 
              {
                case val x1: (x$1 : Object) = x$1
                if x1.$isInstanceOf$[ValueOf[_] @_] then 
                  {
                    case val str: 
                      ValueOf[("foo" : String)] & ValueOf[_] | 
                        scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple
                          , 
                        Nothing, [x, y] =>> x | y]
                       & ValueOf[_]
                     = 
                      x1.$asInstanceOf$[ValueOf[_] @_].$asInstanceOf$[
                        ValueOf[("foo" : String)] & ValueOf[_] | 
                          scala.Tuple.Fold[ValueOf[("bar" : String)] *: 
                            EmptyTuple
                          , Nothing, [x, y] =>> x | y]
                         & ValueOf[_]
                      ]
                    return[matchResult1] 
                      {
                        str.value:_
                      }
                  }
                 else ()
                throw new MatchError(x1)
              }
          closure($anonfun)
        }
      )
    )
} of class class dotty.tools.dotc.ast.Trees$TypeDef # -1
scalac: exception while typing package <empty> {
  final lazy module val Main$package: Main$package$ = new Main$package$()
  @scala.annotation.internal.SourceFile(
    "C:\\Users\\User\\dev\\playground\\src\\main\\scala\\Main.scala"
  ) final module class Main$package$() extends Object() {
    private def writeReplace(): AnyRef = 
      new scala.runtime.ModuleSerializationProxy(classOf[Main$package.type])
    @main() def hello(): Unit = 
      println(
        {
          val Tuple_this: 
            (ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
              scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
            )
           = 
            (
              {
                val res: Tuple = 
                  {
                    val x$2: ValueOf[("foo" : String)] = 
                      {
                        given val t: ValueOf[("foo" : String)] = 
                          new ValueOf[("foo" : String)]("foo")
                        t:ValueOf[("foo" : String)]
                      }
                    {
                      val Tuple_this: ValueOf[("bar" : String)] *: EmptyTuple = 
                        {
                          val res: Tuple = 
                            {
                              val x$2: ValueOf[("bar" : String)] = 
                                {
                                  given val t: ValueOf[("bar" : String)] = 
                                    new ValueOf[("bar" : String)]("bar")
                                  t:ValueOf[("bar" : String)]
                                }
                              {
                                val Tuple_this: EmptyTuple.type = EmptyTuple
                                runtime.Tuples.cons(x$2, Tuple_this).
                                  asInstanceOf
                                [ValueOf[("bar" : String)] *: EmptyTuple.type]:
                                  ValueOf[("bar" : String)] *: EmptyTuple.type
                              }:Any *: Tuple
                            }
                          res.asInstanceOf[
                            ValueOf[("bar" : String)] *: EmptyTuple
                          ]
                        }:ValueOf[("bar" : String)] *: EmptyTuple
                      runtime.Tuples.cons(x$2, Tuple_this).asInstanceOf[
                        ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] 
                          *:
                         EmptyTuple
                      ]:
                        ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] 
                          *:
                         EmptyTuple
                    }:Any *: Tuple
                  }
                res.asInstanceOf[
                  ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                    scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf
                      ]
                  
                ]
              }
            :
              ValueOf[("foo" : String)] *: ValueOf[("bar" : String)] *: 
                scala.Tuple.Map[scala.Tuple$package.EmptyTuple.type, ValueOf]
              
            )
          (
            Tuple_this.productIterator.toList.asInstanceOf[
              
                scala.collection.immutable.List[
                  Tuple.Union[(Tuple_this : Product)]
                ]
              
            ]
          :scala.collection.immutable.List[Tuple.Union[(Tuple_this : Product)]])
        }.map[_](
          {
            def $anonfun(
              x$1: 
                ValueOf[("foo" : String)] | 
                  scala.Tuple.Fold[ValueOf[("bar" : String)] *: EmptyTuple, 
                    Nothing
                  , [x, y] =>> x | y]
                
            ): _ = 
              matchResult1[Object]: 
                {
                  case val x1: (x$1 : Object) = x$1
                  if x1.$isInstanceOf$[ValueOf[_] @_] then 
                    {
                      case val str: 
                        ValueOf[("foo" : String)] & ValueOf[_] | 
                          scala.Tuple.Fold[ValueOf[("bar" : String)] *: 
                            EmptyTuple
                          , Nothing, [x, y] =>> x | y]
                         & ValueOf[_]
                       = 
                        x1.$asInstanceOf$[ValueOf[_] @_].$asInstanceOf$[
                          ValueOf[("foo" : String)] & ValueOf[_] | 
                            scala.Tuple.Fold[ValueOf[("bar" : String)] *: 
                              EmptyTuple
                            , Nothing, [x, y] =>> x | y]
                           & ValueOf[_]
                        ]
                      return[matchResult1] 
                        {
                          str.value:_
                        }
                    }
                   else ()
                  throw new MatchError(x1)
                }
            closure($anonfun)
          }
        )
      )
  }
  @scala.annotation.internal.SourceFile(
    "C:\\Users\\User\\dev\\playground\\src\\main\\scala\\Main.scala"
  ) final class hello() extends Object() {
    <static> def main(args: Array[String]): Unit = 
      try Main$package.hello() catch 
        {
          case error @ _:scala.util.CommandLineParser.ParseError => 
            scala.util.CommandLineParser.showError(error)
        }
  }
} of class class dotty.tools.dotc.ast.Trees$PackageDef # -1
scalac: java.lang.AssertionError: assertion failed:  <none> while compiling C:\Users\User\dev\playground\src\main\scala\Main.scala
scalac: exception occurred while compiling C:\Users\User\dev\playground\src\main\scala\Main.scala

scalac: Error: assertion failed:  <none>
java.lang.AssertionError: assertion failed:  <none>
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.transform.Erasure$Typer.typedSelect(Erasure.scala:721)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2639)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2730)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2916)
	at dotty.tools.dotc.transform.Erasure$Typer.typedTypeApply(Erasure.scala:815)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2688)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2731)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2916)
	at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:837)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2669)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2731)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2916)
	at dotty.tools.dotc.transform.Erasure$Typer.$anonfun$4(Erasure.scala:850)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:153)
	at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:850)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2669)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2731)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2916)
	at dotty.tools.dotc.typer.Typer.$anonfun$34(Typer.scala:2142)
	at dotty.tools.dotc.typer.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:225)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2142)
	at dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:955)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2646)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2730)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2822)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2872)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1068)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2328)
	at dotty.tools.dotc.transform.Erasure$Typer.typedClassDef(Erasure.scala:1057)
	at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$2(Typer.scala:2657)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2661)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2730)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2822)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2872)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1068)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2451)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2702)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2731)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2796)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2800)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2916)
	at dotty.tools.dotc.transform.Erasure.run(Erasure.scala:132)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:303)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:304)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
	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:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:215)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:223)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:230)
	at dotty.tools.dotc.Run.compileSources(Run.scala:166)
	at dotty.tools.dotc.Run.compile(Run.scala:150)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
	at dotty.tools.dotc.Driver.process(Driver.scala:199)
	at dotty.tools.dotc.Main.process(Main.scala)
	at xsbt.CachedCompilerImpl.run(CachedCompilerImpl.java:69)
	at xsbt.CompilerInterface.run(CompilerInterface.java:41)
	at jdk.internal.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:315)
	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:110)
	at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:57)
	at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:43)
	at org.jetbrains.jps.incremental.scala.remote.Main$.compileLogic(Main.scala:158)
	at org.jetbrains.jps.incremental.scala.remote.Main$.$anonfun$handleCommand$1(Main.scala:141)
	at org.jetbrains.jps.incremental.scala.remote.Main$.decorated$1(Main.scala:131)
	at org.jetbrains.jps.incremental.scala.remote.Main$.handleCommand(Main.scala:138)
	at org.jetbrains.jps.incremental.scala.remote.Main$.serverLogic(Main.scala:115)
	at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:71)
	at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
	at jdk.internal.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Checking dependencies... [playground]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'playground'
Searching for compilable files...
Running 'after' tasks
Finished, saving caches...
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
22/04/2021 19:58 - Build completed with 1 error and 8 warnings in 2 sec, 201 ms

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions