Skip to content

Summoning a Type[T] from a recursive inline function crashes Dotty #7358

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
fhackett opened this issue Oct 3, 2019 · 0 comments
Closed

Summoning a Type[T] from a recursive inline function crashes Dotty #7358

fhackett opened this issue Oct 3, 2019 · 0 comments
Assignees

Comments

@fhackett
Copy link
Contributor

fhackett commented Oct 3, 2019

minimized code

package test

import scala.quoted._
import scala.compiletime._

inline def summonT[Tp <: Tuple] <: Tuple = inline erasedValue[Tp] match {
  case _ : Unit => ()
  case _ : (hd *: tl) => {
    type H = hd
    summonFrom {
      case given _ : Type[H] => summon[Type[H]] *: summonT[tl]
    }
  }
}

def test[T : Type] = summonT[Tuple1[List[T]]]

[EDIT] This is a much simpler reproduction I came across after posting the issue.

It seems the problem comes from accessing a generic type (with a Type[T]) from a recursive inline function. Without the tuples the error does not occur.

Stack trace
exception while typing {
  {
    def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T] = 
      evidence$1
    closure($anonfun$1)
  }
} of class class dotty.tools.dotc.ast.Trees$Inlined # 5221
exception while typing scala.collection.immutable.Nil.::[
  scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
](
  {
    {
      def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T]
         = 
      evidence$1
      closure($anonfun$1)
    }
  }
) of class class dotty.tools.dotc.ast.Trees$Apply # 5329
exception while typing scala.runtime.quoted.Unpickler.unpickleType$direct[
  scala.collection.immutable.List[evidence$1.$splice]
](
  scala.collection.immutable.Nil.::[String](
    
      "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
    
  )
, 
  scala.collection.immutable.Nil.::[
    scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
  ](
    {
      {
        def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T]
           = 
        evidence$1
        closure($anonfun$1)
      }
    }
  )
) of class class dotty.tools.dotc.ast.Trees$Apply # 5330
exception while typing scala.runtime.quoted.Unpickler.unpickleType$direct[
  scala.collection.immutable.List[evidence$1.$splice]
](
  scala.collection.immutable.Nil.::[String](
    
      "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
    
  )
, 
  scala.collection.immutable.Nil.::[
    scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
  ](
    {
      {
        def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T]
           = 
        evidence$1
        closure($anonfun$1)
      }
    }
  )
)(scala.quoted.QuoteContext.macroContext) of class class dotty.tools.dotc.ast.Trees$Apply # 5331
exception while typing given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]] = 
  scala.runtime.quoted.Unpickler.unpickleType$direct[
    scala.collection.immutable.List[evidence$1.$splice]
  ](
    scala.collection.immutable.Nil.::[String](
      
        "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
      
    )
  , 
    scala.collection.immutable.Nil.::[
      scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
    ](
      {
        {
          def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
            quoted.Type[T]
           = evidence$1
          closure($anonfun$1)
        }
      }
    )
  )(scala.quoted.QuoteContext.macroContext) of class class dotty.tools.dotc.ast.Trees$ValDef # 5332
exception while typing {
  given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]] = 
    scala.runtime.quoted.Unpickler.unpickleType$direct[
      scala.collection.immutable.List[evidence$1.$splice]
    ](
      scala.collection.immutable.Nil.::[String](
        
          "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
        
      )
    , 
      scala.collection.immutable.Nil.::[
        scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
      ](
        {
          {
            def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
              quoted.Type[T]
             = evidence$1
            closure($anonfun$1)
          }
        }
      )
    )(scala.quoted.QuoteContext.macroContext)
  val x$1: quoted.Type[H] = 
    {
      {
        given_Type_H
      }:scala.quoted.Type(given_Type_H)
    }
  {
    val Tuple_this: Unit = 
      {
        ()
      }
    runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
      {
        x$1
      }
    , 
      {
        Tuple_this
      }
    ):quoted.Type[H] *: Tuple
  }
} of class class dotty.tools.dotc.ast.Trees$Block # 5334
exception while typing {
  given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]] = 
    scala.runtime.quoted.Unpickler.unpickleType$direct[
      scala.collection.immutable.List[evidence$1.$splice]
    ](
      scala.collection.immutable.Nil.::[String](
        
          "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
        
      )
    , 
      scala.collection.immutable.Nil.::[
        scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
      ](
        {
          {
            def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
              quoted.Type[T]
             = evidence$1
            closure($anonfun$1)
          }
        }
      )
    )(scala.quoted.QuoteContext.macroContext)
  val x$1: quoted.Type[H] = 
    {
      {
        given_Type_H
      }:scala.quoted.Type(given_Type_H)
    }
  {
    val Tuple_this: Unit = 
      {
        ()
      }
    runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
      {
        x$1
      }
    , 
      {
        Tuple_this
      }
    ):quoted.Type[H] *: Tuple
  }
}:quoted.Type[scala.collection.immutable.List[T]] *: Tuple of class class dotty.tools.dotc.ast.Trees$Typed # 5335
exception while typing {
  type H = scala.collection.immutable.List[T]
  {
    given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]] = 
      scala.runtime.quoted.Unpickler.unpickleType$direct[
        scala.collection.immutable.List[evidence$1.$splice]
      ](
        scala.collection.immutable.Nil.::[String](
          
            "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
          
        )
      , 
        scala.collection.immutable.Nil.::[
          scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
        ](
          {
            {
              def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
                quoted.Type[T]
               = evidence$1
              closure($anonfun$1)
            }
          }
        )
      )(scala.quoted.QuoteContext.macroContext)
    val x$1: quoted.Type[H] = 
      {
        {
          given_Type_H
        }:scala.quoted.Type(given_Type_H)
      }
    {
      val Tuple_this: Unit = 
        {
          ()
        }
      runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
        {
          x$1
        }
      , 
        {
          Tuple_this
        }
      ):quoted.Type[H] *: Tuple
    }
  }:quoted.Type[scala.collection.immutable.List[T]] *: Tuple
} of class class dotty.tools.dotc.ast.Trees$Block # 5336
exception while typing {
  {
    type H = scala.collection.immutable.List[T]
    {
      given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]] = 
        scala.runtime.quoted.Unpickler.unpickleType$direct[
          scala.collection.immutable.List[evidence$1.$splice]
        ](
          scala.collection.immutable.Nil.::[String](
            
              "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
            
          )
        , 
          scala.collection.immutable.Nil.::[
            scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
          ](
            {
              {
                def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
                  quoted.Type[T]
                 = evidence$1
                closure($anonfun$1)
              }
            }
          )
        )(scala.quoted.QuoteContext.macroContext)
      val x$1: quoted.Type[H] = 
        {
          {
            given_Type_H
          }:scala.quoted.Type(given_Type_H)
        }
      {
        val Tuple_this: Unit = 
          {
            ()
          }
        runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
          {
            x$1
          }
        , 
          {
            Tuple_this
          }
        ):quoted.Type[H] *: Tuple
      }
    }:quoted.Type[scala.collection.immutable.List[T]] *: Tuple
  }
} of class class dotty.tools.dotc.ast.Trees$Inlined # 5337
exception while typing def test[T](implicit evidence$1: quoted.Type[T]): 
  quoted.Type[scala.collection.immutable.List[T]] *: Tuple
 = 
  {
    {
      type H = scala.collection.immutable.List[T]
      {
        given val given_Type_H: quoted.Type[scala.collection.immutable.List[T]]
           = 
        scala.runtime.quoted.Unpickler.unpickleType$direct[
          scala.collection.immutable.List[evidence$1.$splice]
        ](
          scala.collection.immutable.Nil.::[String](
            
              "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
            
          )
        , 
          scala.collection.immutable.Nil.::[
            scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
          ](
            {
              {
                def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
                  quoted.Type[T]
                 = evidence$1
                closure($anonfun$1)
              }
            }
          )
        )(scala.quoted.QuoteContext.macroContext)
        val x$1: quoted.Type[H] = 
          {
            {
              given_Type_H
            }:scala.quoted.Type(given_Type_H)
          }
        {
          val Tuple_this: Unit = 
            {
              ()
            }
          runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
            {
              x$1
            }
          , 
            {
              Tuple_this
            }
          ):quoted.Type[H] *: Tuple
        }
      }:quoted.Type[scala.collection.immutable.List[T]] *: Tuple
    }
  } of class class dotty.tools.dotc.ast.Trees$DefDef # 5338
exception while typing @scala.annotation.internal.SourceFile("Test.scala") final module class 
  Test$package$
() extends Object(), Serializable {
  private def writeReplace(): AnyRef = 
    new scala.runtime.ModuleSerializationProxy(classOf[test.Test$package.type])
  private inline def summonT[Tp <: Tuple]: Tuple = ???
  def test[T](implicit evidence$1: quoted.Type[T]): 
    quoted.Type[scala.collection.immutable.List[T]] *: Tuple
   = 
    {
      {
        type H = scala.collection.immutable.List[T]
        {
          given val given_Type_H: 
            quoted.Type[scala.collection.immutable.List[T]]
           = 
            scala.runtime.quoted.Unpickler.unpickleType$direct[
              scala.collection.immutable.List[evidence$1.$splice]
            ](
              scala.collection.immutable.Nil.::[String](
                
                  "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
                
              )
            , 
              scala.collection.immutable.Nil.::[
                scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
              ](
                {
                  {
                    def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
                      quoted.Type[T]
                     = evidence$1
                    closure($anonfun$1)
                  }
                }
              )
            )(scala.quoted.QuoteContext.macroContext)
          val x$1: quoted.Type[H] = 
            {
              {
                given_Type_H
              }:scala.quoted.Type(given_Type_H)
            }
          {
            val Tuple_this: Unit = 
              {
                ()
              }
            runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
              {
                x$1
              }
            , 
              {
                Tuple_this
              }
            ):quoted.Type[H] *: Tuple
          }
        }:quoted.Type[scala.collection.immutable.List[T]] *: Tuple
      }
    }
} of class class dotty.tools.dotc.ast.Trees$TypeDef # 5340
exception while typing package test {
  final lazy module val Test$package: test.Test$package$ = 
    new test.Test$package$()
  @scala.annotation.internal.SourceFile("Test.scala") final module class 
    Test$package$
  () extends Object(), Serializable {
    private def writeReplace(): AnyRef = 
      new scala.runtime.ModuleSerializationProxy(classOf[test.Test$package.type]
        )
    private inline def summonT[Tp <: Tuple]: Tuple = ???
    def test[T](implicit evidence$1: quoted.Type[T]): 
      quoted.Type[scala.collection.immutable.List[T]] *: Tuple
     = 
      {
        {
          type H = scala.collection.immutable.List[T]
          {
            given val given_Type_H: 
              quoted.Type[scala.collection.immutable.List[T]]
             = 
              scala.runtime.quoted.Unpickler.unpickleType$direct[
                scala.collection.immutable.List[evidence$1.$splice]
              ](
                scala.collection.immutable.Nil.::[String](
                  
                    "XKGrH5GAALX/hecSuQAAAT2pkhwTAAG+AYRBU1RzAYRMaXN0AYVzY2FsYQGKY29sbGVjdGlvbgKCgoMBiWltbXV0YWJsZQKChIUBgSQBjGV2aWRlbmNlJDEkXwqDh4GIAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBiwGIaW50ZXJuYWwCgoKNAYY8aW5pdD4Cgo6LF4GQAoKRij+Cj5IBiVBvc2l0aW9ucwGrL2hvbWUvZmlubi9wcm9ncmFtbWluZy9kb3R0eS9iaW4vVGVzdC5zY2FsYYCjjKGhhnWBNoY1ioOXiaSD/4GAF62OdYpQdYw2joiFcJNWM5WUjIYB7QHthJUA0Kh/mA=="
                  
                )
              , 
                scala.collection.immutable.Nil.::[
                  scala.collection.immutable.Seq[Any] => scala.quoted.Type[?]
                ](
                  {
                    {
                      def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): 
                        quoted.Type[T]
                       = evidence$1
                      closure($anonfun$1)
                    }
                  }
                )
              )(scala.quoted.QuoteContext.macroContext)
            val x$1: quoted.Type[H] = 
              {
                {
                  given_Type_H
                }:scala.quoted.Type(given_Type_H)
              }
            {
              val Tuple_this: Unit = 
                {
                  ()
                }
              runtime.DynamicTuple.dynamicCons[quoted.Type[H], Tuple](
                {
                  x$1
                }
              , 
                {
                  Tuple_this
                }
              ):quoted.Type[H] *: Tuple
            }
          }:quoted.Type[scala.collection.immutable.List[T]] *: Tuple
        }
      }
  }
} of class class dotty.tools.dotc.ast.Trees$PackageDef # 5341
exception occurred while compiling Test.scala
java.lang.AssertionError: assertion failed: position not set for {
  def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T] = 
    evidence$1
  closure($anonfun$1)
} # 5220 of class dotty.tools.dotc.ast.Trees$Block in Test.scala while compiling Test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: position not set for {
  def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[T] = 
    evidence$1
  closure($anonfun$1)
} # 5220 of class dotty.tools.dotc.ast.Trees$Block in Test.scala
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:17)
	at dotty.tools.dotc.typer.Typer$.assertPositioned(Typer.scala:58)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2149)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedInlined(Typer.scala:1291)
	at dotty.tools.dotc.transform.Erasure$Typer.typedInlined(Erasure.scala:595)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2082)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.transform.Erasure$Typer.$anonfun$5(Erasure.scala:564)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:110)
	at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:564)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2061)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.transform.Erasure$Typer.$anonfun$5(Erasure.scala:564)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:110)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:111)
	at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:564)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2061)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:548)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2061)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:1535)
	at dotty.tools.dotc.transform.Erasure$Typer.typedValDef(Erasure.scala:603)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2045)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2116)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2184)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2228)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:747)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:758)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:762)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2069)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.transform.Erasure$Typer.typedTyped(Erasure.scala:393)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2066)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:763)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2069)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedInlined(Typer.scala:1291)
	at dotty.tools.dotc.transform.Erasure$Typer.typedInlined(Erasure.scala:595)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2082)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:1600)
	at dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:635)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2048)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2116)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2184)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2228)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:747)
	at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1727)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2051)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2116)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2184)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2228)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:747)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1852)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2092)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2117)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:123)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2153)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2165)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2241)
	at dotty.tools.dotc.transform.Erasure.run(Erasure.scala:100)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:315)
	at scala.collection.immutable.List.map(List.scala:219)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:316)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:159)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.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:169)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:177)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:184)
	at dotty.tools.dotc.Run.compileSources(Run.scala:121)
	at dotty.tools.dotc.Run.compile(Run.scala:104)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
	at dotty.tools.dotc.Driver.process(Driver.scala:178)
	at dotty.tools.dotc.Driver.process(Driver.scala:147)
	at dotty.tools.dotc.Driver.process(Driver.scala:159)
	at dotty.tools.dotc.Driver.main(Driver.scala:186)
	at dotty.tools.dotc.Main.main(Main.scala)
@fhackett fhackett changed the title Interaction between function tupling and inline expansion crashes dotty Summoning a Type[T] from a recursive inline function crashes Dotty Oct 3, 2019
@nicolasstucki nicolasstucki self-assigned this Oct 3, 2019
nicolasstucki added a commit that referenced this issue Oct 3, 2019
Fix #7358: Add missing span to spliced tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants