【发布时间】:2017-05-17 21:45:16
【问题描述】:
我在这部分的 Kotlin 中遇到了错误:
class GitHubRepoAdapter(
private val context: Context,
private val values: List<GithubRepo>
) : ArrayAdapter<GithubRepo>(
context,
R.layout.list_item,
values
)
private val context: Context
日志中写着:
Error:(14, 25) Accidental override: The following declarations have the same JVM signature (getContext()Landroid/content/Context;): fun <get-context>(): Context fun getContext(): Context!
我看不出是什么导致了问题。
【问题讨论】:
标签: kotlin kotlin-android-extensions kotlin-extension