diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-06-23 12:53:23 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-06-23 13:15:49 +0200 |
commit | 3e7776e6418e047e11d0b11e5a85dfdc500b517e (patch) | |
tree | 199db99b6863d089327a4be823633718c4c908f3 /test/files/run/repl-colon-type.check | |
parent | 5be0722abc913deea1a0bc3e433f1bf4c29f4e09 (diff) | |
download | scala-3e7776e6418e047e11d0b11e5a85dfdc500b517e.tar.gz scala-3e7776e6418e047e11d0b11e5a85dfdc500b517e.tar.bz2 scala-3e7776e6418e047e11d0b11e5a85dfdc500b517e.zip |
Cast arguments where necessary before rewriting closure invocations
The parameter types of a closure invocation can be supertypes of the
parameter types in the implementation method. The closure automatically
casts arguments to the right type. We need to do the same when
rewriting closure invocations. Example:
val fun: String => String = l => l
val l = List("")
fun(l.head)
The closure object calls `apply(Object)Object`. The body method takes
an argument of type `String`.
Diffstat (limited to 'test/files/run/repl-colon-type.check')
0 files changed, 0 insertions, 0 deletions