Chris
07/12/2019, 1:58 PMkarelpeeters
07/12/2019, 2:00 PMCtrl+Shift+B
(go to type definition) get you the same one on both?Chris
07/12/2019, 2:02 PMstreetsofboston
07/12/2019, 2:03 PMfileExtension
functions?Chris
07/12/2019, 2:03 PMkarelpeeters
07/12/2019, 2:03 PMChris
07/12/2019, 2:04 PMval ScriptCompilationConfigurationKeys.fileExtension by PropertiesCollection.key<String>("kts")
val ScriptEvaluationConfigurationKeys.hostConfiguration by PropertiesCollection.key<ScriptingHostConfiguration>()
val ScriptCompilationConfigurationKeys.displayName by PropertiesCollection.key<String>("Kotlin script")
streetsofboston
07/12/2019, 2:05 PMfileExtension
?Chris
07/12/2019, 2:07 PMstreetsofboston
07/12/2019, 2:08 PMPropertiesCollection.Key<T>
defined?Chris
07/12/2019, 2:08 PMclass PropertyKeyDelegate<T>(private val getDefaultValue: PropertiesCollection.() -> T?) {
constructor(defaultValue: T?) : this({ defaultValue })
operator fun getValue(thisRef: Any?, property: KProperty<*>): Key<T> =
Key(property.name, getDefaultValue)
}
streetsofboston
07/12/2019, 2:09 PMPropertiesCollection.Key<T>
. How is PropertiesCollection.Key<T>
itself defined?karelpeeters
07/12/2019, 2:09 PMstreetsofboston
07/12/2019, 2:18 PMinvoke
functions there! Did you try it with an older kotlin version. The one in 1.3.41 has a newer type-inference engine… maybe that is messing up.
It could be that the IDE is complaining, but compilation may be successful.Chris
07/12/2019, 2:30 PMkarelpeeters
07/12/2019, 4:34 PM