Skip to content
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

issue using RType.of(Class) when class is nested inside an object #40

Closed
pjfanning opened this issue Aug 6, 2022 · 1 comment
Closed

Comments

@pjfanning
Copy link
Contributor

There is already a similar test using BigObject.LittleThing -- this works but if you pass classOf[BigObject.LittleThing] instead, it fails.

==> X co.blocke.scala_reflection.ScalaTasty.Classes defined inside objects should work (class input)  0.03s java.util.NoSuchElementException: None.get
    at scala.None$.get(Option.scala:627)
    at scala.None$.get(Option.scala:626)
    at co.blocke.scala_reflection.RType$.unwindType(RType.scala:198)
    at co.blocke.scala_reflection.RTypeOfNoPlugin.$anonfun$2(RType.scala:76)
    at co.blocke.scala_reflection.RTypeOfNoPlugin.$anonfun$3$$anonfun$1(RType.scala:77)
    at scala.quoted.staging.package$.dummyRun$1(staging.scala:39)
    at scala.quoted.staging.package$.withQuotes$$anonfun$1(staging.scala:42)
    at scala.quoted.staging.QuoteCompiler$QuotedFrontend.runOn$$anonfun$1(QuoteCompiler.scala:82)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at scala.quoted.staging.QuoteCompiler$QuotedFrontend.runOn(QuoteCompiler.scala:97)
    at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
    at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
    at dotty.tools.dotc.Run.runPhases$5(Run.scala:216)
    at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:224)
    at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
    at dotty.tools.dotc.Run.compileUnits(Run.scala:231)
    at dotty.tools.dotc.Run.compileUnits(Run.scala:172)
    at scala.quoted.staging.QuoteCompiler$ExprRun.compileExpr(QuoteCompiler.scala:117)
    at scala.quoted.staging.QuoteDriver.run(QuoteDriver.scala:43)
    at scala.quoted.staging.Compiler$$anon$1.run(Compiler.scala:38)
    at scala.quoted.staging.package$.withQuotes(staging.scala:42)
    at co.blocke.scala_reflection.RTypeOfNoPlugin.$anonfun$4(RType.scala:77)
    at scala.Option.getOrElse(Option.scala:201)
    at co.blocke.scala_reflection.RTypeOfNoPlugin.of$$anonfun$1(RType.scala:81)
    at scala.collection.mutable.HashMap.getOrElse(HashMap.scala:436)
    at co.blocke.scala_reflection.RTypeOfNoPlugin.of(RType.scala:86)
    at co.blocke.scala_reflection.RType$.of(RType.scala:139)
    at co.blocke.scala_reflection.ScalaTasty.$init$$$anonfun$27(ScalaTasty.scala:311)
@gzoller
Copy link
Owner

gzoller commented Nov 12, 2022

This is fixed in pjfanning's fork, which I've just pulled into the next feature branch. Test seems to work well, so closing the issue.

@gzoller gzoller closed this as completed Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants