Skip to content

Commit cfe177e

Browse files
committed
debug scala#247 - funny
1 parent b5468cb commit cfe177e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fnGen/WrapFnGen.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ object WrapFnGen {
226226

227227
// This is especially tricky because functions are contravariant in their arguments
228228
// Need to prevent e.g. Any => String from "downcasting" itself to Int => String; we want the more exact conversion
229+
if (jfn.title == "IntFunction") {
230+
println("jfn.pTypes: " + jfn.pTypes)
231+
println("jfn.pTypes.forall(! _.isFinalType): " + jfn.pTypes.forall(! _.isFinalType))
232+
println("jfn.sig: " + jfn.sig)
233+
println("jfn.sam.typeSignature: " + jfn.sam.typeSignature)
234+
println("jfn.sig == jfn.sam.typeSignature: " + (jfn.sig == jfn.sam.typeSignature))
235+
}
229236
val s2jImpTree: (Tree, Int) =
230237
if (jfn.pTypes.forall(! _.isFinalType) && jfn.sig == jfn.sam.typeSignature)
231238
(

0 commit comments

Comments
 (0)