Add compiler tests for support.v4.app.Fragment

This commit is contained in:
Yan Zhulanow
2015-04-08 16:17:12 +03:00
parent 514bc74e9c
commit d7488023d2
16 changed files with 268 additions and 12 deletions
@@ -0,0 +1,17 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/item_detail_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ItemDetailActivity"
tools:ignore="MergeRootFrame" >
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in" />
</FrameLayout>
@@ -0,0 +1,26 @@
package android.support.v4.app
import android.app.Activity
import android.view.View
import android.os.Bundle
import java.io.File
import kotlinx.android.synthetic.layout.*
open class Fragment {
open fun getActivity(): Activity = throw Exception("Function getActivity() is not overridden")
open fun getView(): View = throw Exception("Function getView() is not overridden")
}
public class MyFragment : Fragment()
fun MyFragment.b() {
val x = login
val y = this.login
}
// 2 public _\$_findCachedViewById
// 2 public _\$_clearFindViewByIdCache
// 1 INVOKEVIRTUAL android/support/v4/app/MyFragment\.getView
// 2 GETSTATIC com/myapp/R\$id\.login
// 2 INVOKEVIRTUAL android/support/v4/app/MyFragment\._\$_findCachedViewById
// 2 CHECKCAST android/widget/Button