asdeqpaul
(Paul Stevenson)
1
closures which call a private method result in an illegal access violation at RUNTIME on Android.
presumably because the closure is converted to a nameless class which then doesn’t have access because the method was declared private.
if the method is fileprivate then all is OK
Thanks, logged as bugs://78432
ck
(Carlo Kok)
3
This seems to work fine:
import java.util
import android.app
import android.content
import android.os
import android.util
import android.view
import android.widget
public class MainActivity: Activity {
public override func onCreate(_ savedInstanceState: Bundle!) {
super.onCreate(savedInstanceState)
ContentView = R.layout.main
Pass{
self.Hello();
};
}
private func Pass(a: () ->()) { a(); }
private func Hello() {
Log.i("test", "this")
}
}
What am I missing?
bugs://78432 got closed with status cannotrepro.