-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Macros1.scala:
import scala.quoted.{ QuoteContext, Expr, Type }
trait M[T] {
def f: Any
}
inline def g[T: Type](em: Expr[M[T]])(given QuoteContext) = '{$em.f}
Macros2.scala:
import scala.quoted.{ QuoteContext, Expr }
def h(m: Expr[M[String]])(given QuoteContext): Expr[Any] = g(m)
Compile them separately, e.g.:
sbt:dotty> ;dotty-bootstrapped/dotc ../pg/i6/Macros1.scala ;dotty-bootstrapped/dotc -classpath . ../pg/i6/Macros2.scala
You will get:
Crash
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[info] Running (fork) dotty.tools.dotc.Main -classpath /Users/anatolii/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar:/Users/anatolii/Projects/dotty/dotty/library/../out/bootstrap/dotty-library-bootstrapped/scala-0.20/dotty-library_0.20-0.20.0-bin-SNAPSHOT.jar ../pg/i7322/Macros_1.scala
[success] Total time: 9 s, completed Sep 27, 2019 3:01:59 PM
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[info] Running (fork) dotty.tools.dotc.Main -classpath .:/Users/anatolii/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar:/Users/anatolii/Projects/dotty/dotty/library/../out/bootstrap/dotty-library-bootstrapped/scala-0.20/dotty-library_0.20-0.20.0-bin-SNAPSHOT.jar ../pg/i7322/Macros_2.scala
exception while typing {
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
} of class class dotty.tools.dotc.ast.Trees$Inlined # 1486
exception while typing scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
) of class class dotty.tools.dotc.ast.Trees$Apply # 3244
exception while typing scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).:: of class class dotty.tools.dotc.ast.Trees$Select # 3245
exception while typing scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
] of class class dotty.tools.dotc.ast.Trees$TypeApply # 3246
exception while typing scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext) =>
scala.quoted.Expr[Any]
) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
) of class class dotty.tools.dotc.ast.Trees$Apply # 3247
exception while typing scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
) of class class dotty.tools.dotc.ast.Trees$Apply # 3248
exception while typing scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
)(
{
x$2
}
) of class class dotty.tools.dotc.ast.Trees$Apply # 3249
exception while typing {
val evidence$1: quoted.Type[String] =
scala.runtime.quoted.Unpickler.unpickleType$direct[String](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAB+NFPi9VAAAAOsA64QAAOoBhEFTVHMBhlN0cmluZwGEamF2YQGEbGFuZwKCgoMBiVBvc2l0aW9ucwG/L1VzZXJzL2FuYXRvbGlpL1Byb2plY3RzL2RvdHR5L2RvdHR5Ly4uL3BnL2k3MzIyL01hY3Jvc18yLnNjYWxhgIR1gTaEhYeGAOsA64SG"
)
, scala.collection.immutable.Nil)(x$2)
scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext)
=>
scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
)(
{
x$2
}
)
} of class class dotty.tools.dotc.ast.Trees$Inlined # 1527
exception while typing def h(m: quoted.Expr[M[String]])(given x$2: quoted.QuoteContext):
quoted.Expr[Any]
=
{
val evidence$1: quoted.Type[String] =
scala.runtime.quoted.Unpickler.unpickleType$direct[String](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAB+NFPi9VAAAAOsA64QAAOoBhEFTVHMBhlN0cmluZwGEamF2YQGEbGFuZwKCgoMBiVBvc2l0aW9ucwG/L1VzZXJzL2FuYXRvbGlpL1Byb2plY3RzL2RvdHR5L2RvdHR5Ly4uL3BnL2k3MzIyL01hY3Jvc18yLnNjYWxhgIR1gTaEhYeGAOsA64SG"
)
, scala.collection.immutable.Nil)(x$2)
scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext
)
=> scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given scala.quoted.QuoteContext
)
=> scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
)(
{
x$2
}
)
} of class class dotty.tools.dotc.ast.Trees$DefDef # 1528
exception while typing @scala.annotation.internal.SourceFile("../pg/i7322/Macros_2.scala") final module
class Macros_2$package$() extends Object(), Serializable {
private def writeReplace(): AnyRef =
new scala.runtime.ModuleSerializationProxy(classOf[Macros_2$package.type])
def h(m: quoted.Expr[M[String]])(given x$2: quoted.QuoteContext):
quoted.Expr[Any]
=
{
val evidence$1: quoted.Type[String] =
scala.runtime.quoted.Unpickler.unpickleType$direct[String](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAB+NFPi9VAAAAOsA64QAAOoBhEFTVHMBhlN0cmluZwGEamF2YQGEbGFuZwKCgoMBiVBvc2l0aW9ucwG/L1VzZXJzL2FuYXRvbGlpL1Byb2plY3RzL2RvdHR5L2RvdHR5Ly4uL3BnL2k3MzIyL01hY3Jvc18yLnNjYWxhgIR1gTaEhYeGAOsA64SG"
)
, scala.collection.immutable.Nil)(x$2)
scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given
scala.quoted.QuoteContext
) => scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given
scala.quoted.QuoteContext
) => scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
)(
{
x$2
}
)
}
} of class class dotty.tools.dotc.ast.Trees$TypeDef # 1530
exception while typing package <empty> {
final lazy module val Macros_2$package: Macros_2$package$ =
new Macros_2$package$()
@scala.annotation.internal.SourceFile("../pg/i7322/Macros_2.scala") final
module
class Macros_2$package$() extends Object(), Serializable {
private def writeReplace(): AnyRef =
new scala.runtime.ModuleSerializationProxy(classOf[Macros_2$package.type])
def h(m: quoted.Expr[M[String]])(given x$2: quoted.QuoteContext):
quoted.Expr[Any]
=
{
val evidence$1: quoted.Type[String] =
scala.runtime.quoted.Unpickler.unpickleType$direct[String](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAB+NFPi9VAAAAOsA64QAAOoBhEFTVHMBhlN0cmluZwGEamF2YQGEbGFuZwKCgoMBiVBvc2l0aW9ucwG/L1VzZXJzL2FuYXRvbGlpL1Byb2plY3RzL2RvdHR5L2RvdHR5Ly4uL3BnL2k3MzIyL01hY3Jvc18yLnNjYWxhgIR1gTaEhYeGAOsA64SG"
)
, scala.collection.immutable.Nil)(x$2)
scala.runtime.quoted.Unpickler.unpickleExpr$direct[Any](
scala.collection.immutable.Nil.::[String](
"XKGrH5GAAHmgaRPcQgAAneD27My4AAHuAYRBU1RzAYFmAYRqYXZhAYRsYW5nAoKCgwGGT2JqZWN0AoKEhT+CgYYBgSQBjGV2aWRlbmNlJDEkXwqDiIGJAYxxdW90ZVR5cGVUYWcBhlF1b3RlZBeBjAGFc2NhbGEBiGludGVybmFsAoKOjwGGPGluaXQ+AoKQjBeBkgKCk4s/gpGUAZBNYWNyb3NfMiRwYWNrYWdlF4GWAYc8ZW1wdHk+AYlQb3NpdGlvbnMBvy9Vc2Vycy9hbmF0b2xpaS9Qcm9qZWN0cy9kb3R0eS9kb3R0eS8uLi9wZy9pNzMyMi9NYWNyb3NfMS5zY2FsYYCrk6mMoHCHk4P/gYCDl4qkg/+BgRetjnWLUHWNNpCIhXCVVjOWb5d1l1A3mJmZhwGLAZOAhJoCoYB+voL6qH+jhYST/oCRgA=="
)
,
scala.collection.immutable.Nil.::[
scala.collection.immutable.Seq[Any] => ((given
scala.quoted.QuoteContext
) => scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]):
quoted.Type[String]
= evidence$1
closure($anonfun$2)
}
}
).::[
scala.collection.immutable.Seq[Any] => ((given
scala.quoted.QuoteContext
) => scala.quoted.Expr[Any]) | scala.quoted.Type[?]
](
{
{
def $anonfun$1(x$0: scala.collection.immutable.Seq[Any]):
(given quoted.QuoteContext) => quoted.Expr[M[String]]
=
{
def $anonfun(given evidence$2: quoted.QuoteContext):
quoted.Expr[M[String]]
=
{
m
}
closure($anonfun)
}
closure($anonfun$1)
}
}
)
)(
{
x$2
}
)
}
}
} of class class dotty.tools.dotc.ast.Trees$PackageDef # 1531
exception occurred while compiling ../pg/i7322/Macros_2.scala
java.lang.AssertionError: assertion failed: position not set for {
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[String]
=
evidence$1
closure($anonfun$2)
} # 3204 of class dotty.tools.dotc.ast.Trees$Block in ../pg/i7322/Macros_1.scala while compiling ../pg/i7322/Macros_2.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: position not set for {
def $anonfun$2(x$0: scala.collection.immutable.Seq[Any]): quoted.Type[String]
=
evidence$1
closure($anonfun$2)
} # 3204 of class dotty.tools.dotc.ast.Trees$Block in ../pg/i7322/Macros_1.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:2151)
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.transform.Erasure$Typer.typedSelect(Erasure.scala:429)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2041)
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.typedExpr(Typer.scala:2241)
at dotty.tools.dotc.transform.Erasure$Typer.typedTypeApply(Erasure.scala:530)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2079)
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.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:2151)
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)
[error] Nonzero exit code returned from runner: 1
[error] (dotty-compiler-bootstrapped / Compile / runMain) Nonzero exit code returned from runner: 1
[error] Total time: 9 s, completed Sep 27, 2019 3:02:08 PM
sbt:dotty>
If you put the contents of Macros1.scala
in Macros2.scala
and compile only the latter, it will compile.
Jerry666111