I need to implement a testing function which checks compile-time error information for the "splain" plugin, part of this function needs to convert a codeblock into a string, e.g.:
def convert(fn: => Unit): String
// for testing
val code = convert {
object I extends Seq {}
}
assert(code == "object I extends Seq {}")
Is this possible using standard scala features? Thanks a lot for your advice.
This function will enable verifications of compile-time messages of complex code that needs to be indexed and refactored by IDE often