DmytroMitin / dotty-patched

Eval library and patched Scala-3/Dotty compiler. Evaluating source code and trees at compile time hacking multi-staging programming
Apache License 2.0
20 stars 1 forks source link

Fix `getAnnotations` so that it works with `Class.forName` #14

Open DmytroMitin opened 1 year ago

DmytroMitin commented 1 year ago

https://github.com/DmytroMitin/dotty-patched/commit/9e66aae8811b0ccf620930808db5265ac78fa91d

DmytroMitin commented 1 year ago

https://github.com/DmytroMitin/dotty-patched/commit/72e468cb36a3958d5586b780357ce560c9e32058

java.lang.IllegalArgumentException: Could not find proxy for val clazz$proxy1: java.lang.Class in 
[value clazz$proxy1, value <local AnnotationsTest>, class AnnotationsTest, package com.github.dmytromitin.macros.run,
package com.github.dmytromitin.macros, package com.github.dmytromitin, package com.github, package com, package <root>],
encl = method apply, owners = method apply, class Generated$Code$From$Quoted, package <root>;
enclosures = method apply, class Generated$Code$From$Quoted, package <root>
DmytroMitin commented 1 year ago

For inline clazz: Class[?]

java.lang.AssertionError: assertion failed: Bad superClass for class Any: val <none>
DmytroMitin commented 1 year ago

https://github.com/lampepfl/dotty/discussions/13571 (Could not find proxy in macro)

DmytroMitin commented 1 year ago

https://github.com/lampepfl/dotty/issues/13599