This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
******************************************************************************** | |
tpe.typeSymbol: TypeDef( | |
Foo, | |
Template( | |
DefDef( | |
<init>, | |
List( | |
List( | |
ValDef( | |
x, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait Test1 | |
object Test1 { | |
case object Member extends Test1 | |
} | |
sealed trait Test2 | |
object Test2 { | |
sealed trait SubTrait extends Test2 | |
case object Member extends SubTrait | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait Test1 | |
object Test1 { | |
case object Member extends Test1 | |
} | |
sealed trait Test2 | |
object Test2 { | |
sealed trait SubTrait extends Test2 | |
case object Member extends SubTrait | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait Test1 | |
object Test1 { | |
case object Member extends Test1 | |
} | |
sealed trait Test2 | |
object Test2 { | |
sealed trait SubTrait extends Test2 | |
case object Member extends SubTrait | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait Test1 | |
object Test1 { | |
case object Member extends Test1 | |
} | |
sealed trait Test2 | |
object Test2 { | |
sealed trait SubTrait extends Test2 | |
case object Member extends SubTrait | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Foo() | |
case class Bar(foo: Foo) | |
// succeeds and automatically derives a `Decoder[Foo]` | |
io.circe.Decoder.derived[Bar] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Foo() | |
case class Bar(foo: Foo) | |
// fails because there is no `Decoder[Foo]` | |
io.circe.Decoder.derived[Bar] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.StackOverflowError | |
at dotty.tools.dotc.core.Types$VariantTraversal.stopBecauseStaticOrLocal(Types.scala:5539) | |
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:5656) | |
at dotty.tools.dotc.core.TypeComparer$$anon$1.apply(TypeComparer.scala:266) | |
at dotty.tools.dotc.core.Types$TypeMap.op$proxy18$1(Types.scala:5658) | |
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:5658) | |
at dotty.tools.dotc.core.TypeComparer$$anon$1.apply(TypeComparer.scala:266) | |
at dotty.tools.dotc.core.Types$TypeMap.op$proxy17$1(Types.scala:5625) | |
at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:5625) | |
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:5662) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.annotation.MacroAnnotation | |
import scala.quoted.* | |
class autoGiven extends MacroAnnotation { | |
final def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = { | |
import quotes.reflect.* | |
tree match { | |
case ValDef(name, tpt, Some(rhs)) => rhs.asExpr match { | |
case '{ $rhsExpr: t } => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.StackOverflowError while typechecking /path/to/file.scala | |
scala.runtime.Statics.anyHash(Statics.java:127) | |
scala.collection.immutable.HashMap.get(HashMap.scala:136) | |
dotty.tools.dotc.core.Contexts$Context.property(Contexts.scala:154) | |
dotty.tools.dotc.printing.PlainPrinter.limiter(PlainPrinter.scala:37) | |
dotty.tools.dotc.printing.PlainPrinter.controlled(PlainPrinter.scala:39) | |
dotty.tools.dotc.printing.RefinedPrinter.toText(RefinedPrinter.scala:307) | |
dotty.tools.dotc.core.Types$Type.toText(Types.scala:1911) | |
dotty.tools.dotc.printing.Printer.toTextLocal$$anonfun$1(Printer.scala:170) | |
dotty.tools.dotc.printing.Printer.atPrec(Printer.scala:43) |
NewerOlder