Skip to content

Commit

Permalink
debug scala#247 - funny
Browse files Browse the repository at this point in the history
  • Loading branch information
giabao committed Oct 3, 2021
1 parent b5468cb commit cfe177e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fnGen/WrapFnGen.scala
Expand Up @@ -226,6 +226,13 @@ object WrapFnGen {

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

0 comments on commit cfe177e

Please sign in to comment.