diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index e2fcb3c61e38..63b4c30bcc28 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -1176,9 +1176,9 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma else { val arity = field.meth.tpe.widenDealias.paramTypes.size - _1.size val returnsUnit = field.meth.tpe.widenDealias.resultType.classSymbol == UnitClass - if (returnsUnit) - ctx.requiredClass(("dotty.runtime.function.JProcedure" + arity)) - else ctx.requiredClass(("dotty.runtime.function.JFunction" + arity)) + if (returnsUnit) ctx.requiredClass(("dotty.runtime.function.JProcedure" + arity)) + else if (arity <= 2) ctx.requiredClass(("dotty.runtime.function.JFunction" + arity)) + else ctx.requiredClass(("scala.Function" + arity)) } } } diff --git a/library/src/dotty/runtime/function/JFunction.java b/library/src/dotty/runtime/function/JFunction.java deleted file mode 100644 index a5f43a6d5b0c..000000000000 --- a/library/src/dotty/runtime/function/JFunction.java +++ /dev/null @@ -1,233 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.runtime.BoxedUnit; - -public final class JFunction { - private JFunction() {} - public static scala.Function0 func(JFunction0 f) { return f; } - public static scala.Function0 proc(JProcedure0 p) { return p; } - @SuppressWarnings("unchecked") - public static scala.Function0 procSpecialized(JFunction0$mcV$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcB$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcS$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcC$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function0 funcSpecialized(JFunction0$mcZ$sp f) { return f; } - public static scala.Function1 func(JFunction1 f) { return f; } - public static scala.Function1 proc(JProcedure1 p) { return p; } - @SuppressWarnings("unchecked") - public static scala.Function1 procSpecialized(JFunction1$mcVI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcZI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcFI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 procSpecialized(JFunction1$mcVJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcZJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcFJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 procSpecialized(JFunction1$mcVF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcZF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcIF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcFF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcJF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcDF$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 procSpecialized(JFunction1$mcVD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcZD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcFD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function1 funcSpecialized(JFunction1$mcDD$sp f) { return f; } - public static scala.Function2 func(JFunction2 f) { return f; } - public static scala.Function2 proc(JProcedure2 p) { return p; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDII$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDIJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDID$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDJI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDJJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDJD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDDI$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDDJ$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 procSpecialized(JFunction2$mcVDD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcZDD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcIDD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcFDD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcJDD$sp f) { return f; } - @SuppressWarnings("unchecked") - public static scala.Function2 funcSpecialized(JFunction2$mcDDD$sp f) { return f; } - public static scala.Function3 func(JFunction3 f) { return f; } - public static scala.Function3 proc(JProcedure3 p) { return p; } - public static scala.Function4 func(JFunction4 f) { return f; } - public static scala.Function4 proc(JProcedure4 p) { return p; } - public static scala.Function5 func(JFunction5 f) { return f; } - public static scala.Function5 proc(JProcedure5 p) { return p; } - public static scala.Function6 func(JFunction6 f) { return f; } - public static scala.Function6 proc(JProcedure6 p) { return p; } - public static scala.Function7 func(JFunction7 f) { return f; } - public static scala.Function7 proc(JProcedure7 p) { return p; } - public static scala.Function8 func(JFunction8 f) { return f; } - public static scala.Function8 proc(JProcedure8 p) { return p; } - public static scala.Function9 func(JFunction9 f) { return f; } - public static scala.Function9 proc(JProcedure9 p) { return p; } - public static scala.Function10 func(JFunction10 f) { return f; } - public static scala.Function10 proc(JProcedure10 p) { return p; } - public static scala.Function11 func(JFunction11 f) { return f; } - public static scala.Function11 proc(JProcedure11 p) { return p; } - public static scala.Function12 func(JFunction12 f) { return f; } - public static scala.Function12 proc(JProcedure12 p) { return p; } - public static scala.Function13 func(JFunction13 f) { return f; } - public static scala.Function13 proc(JProcedure13 p) { return p; } - public static scala.Function14 func(JFunction14 f) { return f; } - public static scala.Function14 proc(JProcedure14 p) { return p; } - public static scala.Function15 func(JFunction15 f) { return f; } - public static scala.Function15 proc(JProcedure15 p) { return p; } - public static scala.Function16 func(JFunction16 f) { return f; } - public static scala.Function16 proc(JProcedure16 p) { return p; } - public static scala.Function17 func(JFunction17 f) { return f; } - public static scala.Function17 proc(JProcedure17 p) { return p; } - public static scala.Function18 func(JFunction18 f) { return f; } - public static scala.Function18 proc(JProcedure18 p) { return p; } - public static scala.Function19 func(JFunction19 f) { return f; } - public static scala.Function19 proc(JProcedure19 p) { return p; } - public static scala.Function20 func(JFunction20 f) { return f; } - public static scala.Function20 proc(JProcedure20 p) { return p; } - public static scala.Function21 func(JFunction21 f) { return f; } - public static scala.Function21 proc(JProcedure21 p) { return p; } - public static scala.Function22 func(JFunction22 f) { return f; } - public static scala.Function22 proc(JProcedure22 p) { return p; } -} - diff --git a/library/src/dotty/runtime/function/JFunction0.java b/library/src/dotty/runtime/function/JFunction0.java index a5ffe005eb5d..2714044c83f5 100644 --- a/library/src/dotty/runtime/function/JFunction0.java +++ b/library/src/dotty/runtime/function/JFunction0.java @@ -7,8 +7,6 @@ @FunctionalInterface public interface JFunction0 extends scala.Function0, java.io.Serializable { - default void $init$() { - }; default void apply$mcV$sp() { apply(); } diff --git a/library/src/dotty/runtime/function/JFunction1.java b/library/src/dotty/runtime/function/JFunction1.java index 718f90bc6e46..28be7cd43ab3 100644 --- a/library/src/dotty/runtime/function/JFunction1.java +++ b/library/src/dotty/runtime/function/JFunction1.java @@ -7,8 +7,6 @@ @FunctionalInterface public interface JFunction1 extends scala.Function1, java.io.Serializable { - default void $init$() { - }; @Override @SuppressWarnings("unchecked") @@ -213,7 +211,7 @@ default scala.Function1 compose(scala.Function1 g) { default scala.Function1 compose$mcDD$sp(scala.Function1 g) { return compose(g); } - + @SuppressWarnings("unchecked") default scala.Function1 andThen$mcVI$sp(scala.Function1 g) { return andThen(g); diff --git a/library/src/dotty/runtime/function/JFunction10.java b/library/src/dotty/runtime/function/JFunction10.java deleted file mode 100644 index 97ac03e6a8c6..000000000000 --- a/library/src/dotty/runtime/function/JFunction10.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction10 extends scala.Function10, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction11.java b/library/src/dotty/runtime/function/JFunction11.java deleted file mode 100644 index a71bf06e249e..000000000000 --- a/library/src/dotty/runtime/function/JFunction11.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction11 extends scala.Function11, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction12.java b/library/src/dotty/runtime/function/JFunction12.java deleted file mode 100644 index 5c36a2f3be9f..000000000000 --- a/library/src/dotty/runtime/function/JFunction12.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction12 extends scala.Function12, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction13.java b/library/src/dotty/runtime/function/JFunction13.java deleted file mode 100644 index e0ea5e4b46d0..000000000000 --- a/library/src/dotty/runtime/function/JFunction13.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction13 extends scala.Function13, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction14.java b/library/src/dotty/runtime/function/JFunction14.java deleted file mode 100644 index 1997832b3b65..000000000000 --- a/library/src/dotty/runtime/function/JFunction14.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction14 extends scala.Function14, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction15.java b/library/src/dotty/runtime/function/JFunction15.java deleted file mode 100644 index 98cdc2d0fbdc..000000000000 --- a/library/src/dotty/runtime/function/JFunction15.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction15 extends scala.Function15, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction16.java b/library/src/dotty/runtime/function/JFunction16.java deleted file mode 100644 index 46860c1ae072..000000000000 --- a/library/src/dotty/runtime/function/JFunction16.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction16 extends scala.Function16, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction17.java b/library/src/dotty/runtime/function/JFunction17.java deleted file mode 100644 index 0424be70e002..000000000000 --- a/library/src/dotty/runtime/function/JFunction17.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction17 extends scala.Function17, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction18.java b/library/src/dotty/runtime/function/JFunction18.java deleted file mode 100644 index 66df833ff5da..000000000000 --- a/library/src/dotty/runtime/function/JFunction18.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction18 extends scala.Function18, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction19.java b/library/src/dotty/runtime/function/JFunction19.java deleted file mode 100644 index fb11b0ec6c22..000000000000 --- a/library/src/dotty/runtime/function/JFunction19.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction19 extends scala.Function19, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction2.java b/library/src/dotty/runtime/function/JFunction2.java index af6f62158cce..637feda88885 100644 --- a/library/src/dotty/runtime/function/JFunction2.java +++ b/library/src/dotty/runtime/function/JFunction2.java @@ -9,28 +9,6 @@ @FunctionalInterface public interface JFunction2 extends scala.Function2, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1> curried() { - return x1 -> x2 -> apply(x1, x2); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - return x0$1 -> { - if (x0$1 == null) { - throw new MatchError(x0$1); - } - T1 x1 = x0$1._1(); - T2 x2 = x0$1._2(); - R r = this.apply(x1, x2); - return r; - } - ; - } - @SuppressWarnings("unchecked") default void apply$mcVII$sp(int v1, int v2) { apply((T1) ((Integer) v1), (T2) ((Integer) v2)); @@ -247,7 +225,7 @@ default scala.Function1, R> tupled() { default double apply$mcDDD$sp(double v1, double v2) { return scala.runtime.BoxesRunTime.unboxToDouble(apply((T1) ((Double) v1), (T2) ((Double) v2))); } - + @SuppressWarnings("unchecked") default scala.Function1 curried$mcVII$sp() { return curried(); @@ -464,7 +442,7 @@ default scala.Function1, R> tupled() { default scala.Function1 curried$mcDDD$sp() { return curried(); } - + @SuppressWarnings("unchecked") default scala.Function1 tupled$mcVII$sp() { return tupled(); diff --git a/library/src/dotty/runtime/function/JFunction20.java b/library/src/dotty/runtime/function/JFunction20.java deleted file mode 100644 index fc3bd14c614e..000000000000 --- a/library/src/dotty/runtime/function/JFunction20.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction20 extends scala.Function20, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction21.java b/library/src/dotty/runtime/function/JFunction21.java deleted file mode 100644 index 222d01b5e59b..000000000000 --- a/library/src/dotty/runtime/function/JFunction21.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction21 extends scala.Function21, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction22.java b/library/src/dotty/runtime/function/JFunction22.java deleted file mode 100644 index 518d3f51aa53..000000000000 --- a/library/src/dotty/runtime/function/JFunction22.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction22 extends scala.Function22, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>>>>>>>>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction3.java b/library/src/dotty/runtime/function/JFunction3.java deleted file mode 100644 index 867aaba23933..000000000000 --- a/library/src/dotty/runtime/function/JFunction3.java +++ /dev/null @@ -1,36 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction3 extends scala.Function3, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>> curried() { - return x1 -> x2 -> x3 -> apply(x1, x2, x3); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - return x0$1 -> { - if (x0$1 == null) { - throw new MatchError(x0$1); - } - T1 x1 = x0$1._1(); - T2 x2 = x0$1._2(); - T3 x3 = x0$1._3(); - R r = this.apply(x1, x2, x3); - return r; - } - ; - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction4.java b/library/src/dotty/runtime/function/JFunction4.java deleted file mode 100644 index 0db0ddce054b..000000000000 --- a/library/src/dotty/runtime/function/JFunction4.java +++ /dev/null @@ -1,37 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction4 extends scala.Function4, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>> curried() { - return x1 -> x2 -> x3 -> x4 -> apply(x1, x2, x3, x4); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - return x0$1 -> { - if (x0$1 == null) { - throw new MatchError(x0$1); - } - T1 x1 = x0$1._1(); - T2 x2 = x0$1._2(); - T3 x3 = x0$1._3(); - T4 x4 = x0$1._4(); - R r = this.apply(x1, x2, x3, x4); - return r; - } - ; - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction5.java b/library/src/dotty/runtime/function/JFunction5.java deleted file mode 100644 index 150c0a3ac18c..000000000000 --- a/library/src/dotty/runtime/function/JFunction5.java +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction5 extends scala.Function5, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction6.java b/library/src/dotty/runtime/function/JFunction6.java deleted file mode 100644 index 8a128bf3d9e8..000000000000 --- a/library/src/dotty/runtime/function/JFunction6.java +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction6 extends scala.Function6, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction7.java b/library/src/dotty/runtime/function/JFunction7.java deleted file mode 100644 index 9a29d2dc1569..000000000000 --- a/library/src/dotty/runtime/function/JFunction7.java +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction7 extends scala.Function7, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction8.java b/library/src/dotty/runtime/function/JFunction8.java deleted file mode 100644 index 35fd63083f0b..000000000000 --- a/library/src/dotty/runtime/function/JFunction8.java +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -import scala.MatchError; - -@FunctionalInterface -public interface JFunction8 extends scala.Function8, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JFunction9.java b/library/src/dotty/runtime/function/JFunction9.java deleted file mode 100644 index 4f3192a1cc29..000000000000 --- a/library/src/dotty/runtime/function/JFunction9.java +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (C) 2012-2014 Typesafe Inc. - */ - -package dotty.runtime.function; - -@FunctionalInterface -public interface JFunction9 extends scala.Function9, java.io.Serializable { - default void $init$() { - }; - - @SuppressWarnings("unchecked") - default scala.Function1>>>>>>>> curried() { - throw new UnsupportedOperationException("todo"); - } - - @SuppressWarnings("unchecked") - default scala.Function1, R> tupled() { - throw new UnsupportedOperationException("todo"); - } - - -} diff --git a/library/src/dotty/runtime/function/JProcedure0.java b/library/src/dotty/runtime/function/JProcedure0.java index c3430b76d75c..a37f26a6a823 100644 --- a/library/src/dotty/runtime/function/JProcedure0.java +++ b/library/src/dotty/runtime/function/JProcedure0.java @@ -9,9 +9,6 @@ @FunctionalInterface public interface JProcedure0 extends JFunction0, java.io.Serializable { - default void $init$() { - } - void applyVoid(); default BoxedUnit apply() { diff --git a/library/src/dotty/runtime/function/JProcedure1.java b/library/src/dotty/runtime/function/JProcedure1.java index 193c7e289980..0b4724116a9c 100644 --- a/library/src/dotty/runtime/function/JProcedure1.java +++ b/library/src/dotty/runtime/function/JProcedure1.java @@ -9,9 +9,6 @@ @FunctionalInterface public interface JProcedure1 extends JFunction1, java.io.Serializable { - default void $init$() { - } - void applyVoid(T1 t1); default BoxedUnit apply(T1 t1) { diff --git a/library/src/dotty/runtime/function/JProcedure10.java b/library/src/dotty/runtime/function/JProcedure10.java index e7fb4bf05abc..cf4297823741 100644 --- a/library/src/dotty/runtime/function/JProcedure10.java +++ b/library/src/dotty/runtime/function/JProcedure10.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure10 extends JFunction10, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure10 extends scala.Function10, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10) { diff --git a/library/src/dotty/runtime/function/JProcedure11.java b/library/src/dotty/runtime/function/JProcedure11.java index aa93dcfb8a4c..68b186bbc6c2 100644 --- a/library/src/dotty/runtime/function/JProcedure11.java +++ b/library/src/dotty/runtime/function/JProcedure11.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure11 extends JFunction11, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure11 extends scala.Function11, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11) { diff --git a/library/src/dotty/runtime/function/JProcedure12.java b/library/src/dotty/runtime/function/JProcedure12.java index a64415f9bdd7..8ab16f898f44 100644 --- a/library/src/dotty/runtime/function/JProcedure12.java +++ b/library/src/dotty/runtime/function/JProcedure12.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure12 extends JFunction12, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure12 extends scala.Function12, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12) { diff --git a/library/src/dotty/runtime/function/JProcedure13.java b/library/src/dotty/runtime/function/JProcedure13.java index b77724e3782e..e6f419d6ca9d 100644 --- a/library/src/dotty/runtime/function/JProcedure13.java +++ b/library/src/dotty/runtime/function/JProcedure13.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure13 extends JFunction13, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure13 extends scala.Function13, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13) { diff --git a/library/src/dotty/runtime/function/JProcedure14.java b/library/src/dotty/runtime/function/JProcedure14.java index 330a4ae11c42..052a99cfddae 100644 --- a/library/src/dotty/runtime/function/JProcedure14.java +++ b/library/src/dotty/runtime/function/JProcedure14.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure14 extends JFunction14, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure14 extends scala.Function14, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14) { diff --git a/library/src/dotty/runtime/function/JProcedure15.java b/library/src/dotty/runtime/function/JProcedure15.java index a1ae0d756a3d..a7aac983c523 100644 --- a/library/src/dotty/runtime/function/JProcedure15.java +++ b/library/src/dotty/runtime/function/JProcedure15.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure15 extends JFunction15, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure15 extends scala.Function15, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15) { diff --git a/library/src/dotty/runtime/function/JProcedure16.java b/library/src/dotty/runtime/function/JProcedure16.java index fcb17c9e37ec..9c62ab1a6ac3 100644 --- a/library/src/dotty/runtime/function/JProcedure16.java +++ b/library/src/dotty/runtime/function/JProcedure16.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure16 extends JFunction16, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure16 extends scala.Function16, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16) { diff --git a/library/src/dotty/runtime/function/JProcedure17.java b/library/src/dotty/runtime/function/JProcedure17.java index 5fabd706de46..b685fe9bd084 100644 --- a/library/src/dotty/runtime/function/JProcedure17.java +++ b/library/src/dotty/runtime/function/JProcedure17.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure17 extends JFunction17, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure17 extends scala.Function17, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17) { diff --git a/library/src/dotty/runtime/function/JProcedure18.java b/library/src/dotty/runtime/function/JProcedure18.java index 8a5d0f18fb86..72dd36912ade 100644 --- a/library/src/dotty/runtime/function/JProcedure18.java +++ b/library/src/dotty/runtime/function/JProcedure18.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure18 extends JFunction18, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure18 extends scala.Function18, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) { diff --git a/library/src/dotty/runtime/function/JProcedure19.java b/library/src/dotty/runtime/function/JProcedure19.java index 7b2b4b76bd6f..afeccb710ae2 100644 --- a/library/src/dotty/runtime/function/JProcedure19.java +++ b/library/src/dotty/runtime/function/JProcedure19.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure19 extends JFunction19, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure19 extends scala.Function19, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19) { diff --git a/library/src/dotty/runtime/function/JProcedure2.java b/library/src/dotty/runtime/function/JProcedure2.java index d8cd06dd47e8..ea47fe76fca9 100644 --- a/library/src/dotty/runtime/function/JProcedure2.java +++ b/library/src/dotty/runtime/function/JProcedure2.java @@ -9,9 +9,6 @@ @FunctionalInterface public interface JProcedure2 extends JFunction2, java.io.Serializable { - default void $init$() { - } - void applyVoid(T1 t1, T2 t2); default BoxedUnit apply(T1 t1, T2 t2) { diff --git a/library/src/dotty/runtime/function/JProcedure20.java b/library/src/dotty/runtime/function/JProcedure20.java index 4183512277fb..e69e248a1c00 100644 --- a/library/src/dotty/runtime/function/JProcedure20.java +++ b/library/src/dotty/runtime/function/JProcedure20.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure20 extends JFunction20, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure20 extends scala.Function20, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20) { diff --git a/library/src/dotty/runtime/function/JProcedure21.java b/library/src/dotty/runtime/function/JProcedure21.java index 26170003a94b..f77f3467b882 100644 --- a/library/src/dotty/runtime/function/JProcedure21.java +++ b/library/src/dotty/runtime/function/JProcedure21.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure21 extends JFunction21, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure21 extends scala.Function21, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21) { diff --git a/library/src/dotty/runtime/function/JProcedure22.java b/library/src/dotty/runtime/function/JProcedure22.java index a104b4f4aff4..6c5c7296c41d 100644 --- a/library/src/dotty/runtime/function/JProcedure22.java +++ b/library/src/dotty/runtime/function/JProcedure22.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure22 extends JFunction22, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure22 extends scala.Function22, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22) { diff --git a/library/src/dotty/runtime/function/JProcedure3.java b/library/src/dotty/runtime/function/JProcedure3.java index 4d66557b5035..30eb32533d2f 100644 --- a/library/src/dotty/runtime/function/JProcedure3.java +++ b/library/src/dotty/runtime/function/JProcedure3.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure3 extends JFunction3, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure3 extends scala.Function3, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3); default BoxedUnit apply(T1 t1, T2 t2, T3 t3) { diff --git a/library/src/dotty/runtime/function/JProcedure4.java b/library/src/dotty/runtime/function/JProcedure4.java index 8bf7282c8c7b..eaa3b2a24ab1 100644 --- a/library/src/dotty/runtime/function/JProcedure4.java +++ b/library/src/dotty/runtime/function/JProcedure4.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure4 extends JFunction4, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure4 extends scala.Function4, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4) { diff --git a/library/src/dotty/runtime/function/JProcedure5.java b/library/src/dotty/runtime/function/JProcedure5.java index 07fbb0c2d239..aad50f8c9fd3 100644 --- a/library/src/dotty/runtime/function/JProcedure5.java +++ b/library/src/dotty/runtime/function/JProcedure5.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure5 extends JFunction5, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure5 extends scala.Function5, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { diff --git a/library/src/dotty/runtime/function/JProcedure6.java b/library/src/dotty/runtime/function/JProcedure6.java index da044b203e5b..63e8f6cf4833 100644 --- a/library/src/dotty/runtime/function/JProcedure6.java +++ b/library/src/dotty/runtime/function/JProcedure6.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure6 extends JFunction6, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure6 extends scala.Function6, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { diff --git a/library/src/dotty/runtime/function/JProcedure7.java b/library/src/dotty/runtime/function/JProcedure7.java index 3583e3a6a24a..f69b0f44795d 100644 --- a/library/src/dotty/runtime/function/JProcedure7.java +++ b/library/src/dotty/runtime/function/JProcedure7.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure7 extends JFunction7, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure7 extends scala.Function7, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { diff --git a/library/src/dotty/runtime/function/JProcedure8.java b/library/src/dotty/runtime/function/JProcedure8.java index ec7a54d346c4..b172754ec378 100644 --- a/library/src/dotty/runtime/function/JProcedure8.java +++ b/library/src/dotty/runtime/function/JProcedure8.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure8 extends JFunction8, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure8 extends scala.Function8, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { diff --git a/library/src/dotty/runtime/function/JProcedure9.java b/library/src/dotty/runtime/function/JProcedure9.java index 1de9b280a6e9..cd7f6b9a67e9 100644 --- a/library/src/dotty/runtime/function/JProcedure9.java +++ b/library/src/dotty/runtime/function/JProcedure9.java @@ -8,10 +8,7 @@ import scala.runtime.BoxedUnit; @FunctionalInterface -public interface JProcedure9 extends JFunction9, java.io.Serializable { - default void $init$() { - } - +public interface JProcedure9 extends scala.Function9, java.io.Serializable { void applyVoid(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9); default BoxedUnit apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { diff --git a/tests/run/i6109.scala b/tests/run/i6109.scala new file mode 100644 index 000000000000..30093fa05242 --- /dev/null +++ b/tests/run/i6109.scala @@ -0,0 +1,64 @@ +object Test extends App { + val f2 = (x1: Int, x2: Int) => x2 + assert(f2.curried(1)(2) == 2) + + val f3 = (x1: Int, x2: Int, x3: Int) => x3 + assert(f3.curried(1)(2)(3) == 3) + + val f4 = (x1: Int, x2: Int, x3: Int, x4: Int) => x4 + assert(f4.curried(1)(2)(3)(4) == 4) + + val f5 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int) => x5 + assert(f5.curried(1)(2)(3)(4)(5) == 5) + + val f6 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int) => x6 + assert(f6.curried(1)(2)(3)(4)(5)(6) == 6) + + val f7 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int) => x7 + assert(f7.curried(1)(2)(3)(4)(5)(6)(7) == 7) + + val f8 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int) => x8 + assert(f8.curried(1)(2)(3)(4)(5)(6)(7)(8) == 8) + + val f9 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int) => x9 + assert(f9.curried(1)(2)(3)(4)(5)(6)(7)(8)(9) == 9) + + val f10 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int) => x10 + assert(f10.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10) == 10) + + val f11 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int) => x11 + assert(f11.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11) == 11) + + val f12 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int) => x12 + assert(f12.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12) == 12) + + val f13 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int) => x13 + assert(f13.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13) == 13) + + val f14 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int) => x14 + assert(f14.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14) == 14) + + val f15 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int) => x15 + assert(f15.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15) == 15) + + val f16 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int) => x16 + assert(f16.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16) == 16) + + val f17 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int) => x17 + assert(f17.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17) == 17) + + val f18 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int) => x18 + assert(f18.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18) == 18) + + val f19 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int) => x19 + assert(f19.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19) == 19) + + val f20 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int) => x20 + assert(f20.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20) == 20) + + val f21 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int) => x21 + assert(f21.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)(21) == 21) + + val f22 = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int) => x22 + assert(f22.curried(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)(21)(22) == 22) +} \ No newline at end of file