failing test for kt-475
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
import java.math.BigDecimal
|
||||||
|
|
||||||
|
fun box() : String {
|
||||||
|
// Easy to make BigDecimals user-friendly
|
||||||
|
System.out?.println(
|
||||||
|
"2.00".bd - "1.00"
|
||||||
|
)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
val String.bd = BigDecimal(this)
|
||||||
|
|
||||||
|
fun BigDecimal.minus(other : BigDecimal) = this.subtract(other)
|
||||||
|
fun BigDecimal.minus(other : String) = subtract(other.bd) // this can be omitted
|
||||||
@@ -32,4 +32,8 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
|
|||||||
public void testVirtual() throws Exception {
|
public void testVirtual() throws Exception {
|
||||||
blackBoxFile("extensionFunctions/virtual.jet");
|
blackBoxFile("extensionFunctions/virtual.jet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKt475() throws Exception {
|
||||||
|
blackBoxFile("regressions/kt475.jet");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user