Scala conditional compilation
问题 I'm writing a Scala program and I want it to work with two version of a big library. This big library's version 2 changes the API very slightly (only one class constructor signature has an extra parameter). // Lib v1 class APIClass(a: String, b:Integer){ ... } // Lib v2 class APIClass(a: String, b: Integer, c: String){ ... } // And my code extends APIClass.. And I have no #IFDEF class MyClass() extends APIClass("x", 1){ // <-- would be APIClass("x", 1, "y") in library v2 ... } I really don't