Created
May 25, 2016 11:25
-
-
Save DarkDimius/73b9ab0eeb7c2030ee8959aa4e1a881f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/scala/compat/java8/JFunction1$mcII$sp.java b/src/scala/compat/java8/JFunction1$mcII$sp.java | |
index 14fce8a..56eb652 100644 | |
--- a/src/scala/compat/java8/JFunction1$mcII$sp.java | |
+++ b/src/scala/compat/java8/JFunction1$mcII$sp.java | |
@@ -5,9 +5,17 @@ | |
package scala.compat.java8; | |
+import dotty.runtime.vc.VCIntPrototype; | |
+ | |
@FunctionalInterface | |
public interface JFunction1$mcII$sp extends JFunction1 { | |
abstract int apply$mcII$sp(int v1); | |
- default Object apply(Object t) { return (Integer) apply$mcII$sp((Integer) t); } | |
+ default Object apply(Object t) { | |
+ int arg = 0; | |
+ if (t instanceof Integer) | |
+ arg = (Integer) t; | |
+ else arg = ((VCIntPrototype) t).underlying(); | |
+ | |
+ return (Integer) apply$mcII$sp(arg); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ping @VladimirNik