Skip to content

Fix #6109: implement FunctionX.curried #6111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,8 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
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))
else if (arity <= 2) ctx.requiredClass(("dotty.runtime.function.JFunction" + arity))
else ctx.requiredClass(("scala.Function" + arity))
}
}
}
Expand Down
233 changes: 0 additions & 233 deletions library/src/dotty/runtime/function/JFunction.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction10.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction11.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction12.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction13.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction14.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction15.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction16.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction17.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction18.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction19.java

This file was deleted.

23 changes: 2 additions & 21 deletions library/src/dotty/runtime/function/JFunction2.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,6 @@ public interface JFunction2<T1, T2, R> extends scala.Function2<T1, T2, R>, java.
default void $init$() {
};

@SuppressWarnings("unchecked")
default scala.Function1<T1, scala.Function1<T2, R>> curried() {
return x1 -> x2 -> apply(x1, x2);
}

@SuppressWarnings("unchecked")
default scala.Function1<scala.Tuple2<T1, T2>, 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));
Expand Down Expand Up @@ -247,7 +228,7 @@ default scala.Function1<scala.Tuple2<T1, T2>, 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();
Expand Down Expand Up @@ -464,7 +445,7 @@ default scala.Function1<scala.Tuple2<T1, T2>, R> tupled() {
default scala.Function1 curried$mcDDD$sp() {
return curried();
}

@SuppressWarnings("unchecked")
default scala.Function1 tupled$mcVII$sp() {
return tupled();
Expand Down
24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction20.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction21.java

This file was deleted.

24 changes: 0 additions & 24 deletions library/src/dotty/runtime/function/JFunction22.java

This file was deleted.

Loading