Account for substitutions of one variable for another (it must remain a variable)

This commit is contained in:
Andrey Breslav
2014-08-25 20:03:25 +04:00
parent bdbd469aad
commit 969beb7898
3 changed files with 46 additions and 15 deletions
@@ -0,0 +1,23 @@
// FILE: p/Visitor.java
package p;
public interface Visitor<D> {
}
// FILE: p/Element.java
package p;
public class Element {
public <D> R accept(@NotNull Visitor<D> visitor, D data) {return null;}
}
// FILE: k.kt
import p.*
fun test(v: Visitor<Nothing>, e: Element) {
e.accept(v, null)
}