I am working on a library that depends on Scala 2.9, but only for a minor function. I would like to offer a version compatible with 2.8, but I do not want to support two branches of code. Since I use SBT, I would like to take advantage of the cross compilation features.
However, I don't know if there is a way to provide a conditional compilation equivalent to include a piece of code only if using Scala 2.9. Reflexivity may be an option (but how?).
Edit: The functions that I use in 2.9 are the new sys package object.
source share