bostonmacosx
09/14/2017, 1:10 PMJvidal
09/14/2017, 3:09 PMkarelpeeters
09/14/2017, 3:24 PMilya.gorbunov
09/14/2017, 5:09 PMusing
block.dalexander
09/14/2017, 8:02 PMdiesieben07
09/14/2017, 8:48 PMtianhao
09/15/2017, 12:36 AMqwert_ukg
09/15/2017, 3:09 PMget
operator to my type and do something like this array["a", true, null, 1]
karelpeeters
09/15/2017, 3:31 PMPerson("Dave", age = 30)
is also resolvable at compile-time. Is there anything else that requires const
?karelpeeters
09/15/2017, 7:17 PMUnit
is considered null
there. The result if I run the code there is a
error
Dalinar
09/16/2017, 3:02 AMwhen
)? is it ok to keep using them?Dalinar
09/16/2017, 3:15 AMa.squiggly b.c.d.MyClass()
)egoscio
09/16/2017, 9:11 AM[kts] kotlin.script.experimental.dependencies.DependenciesResolver.NoDependencies must have a constructor without required parameters
nil2l
09/16/2017, 8:38 PMkarelpeeters
09/16/2017, 8:50 PMsuper(param.also { ... })
redrield
09/17/2017, 12:49 AMharmony
09/17/2017, 5:46 AMmortda-m
09/17/2017, 3:30 PMfstn
09/17/2017, 5:04 PMlovis
09/18/2017, 9:20 AMlist
. x
, y
, or foo
would be equally informative….neil.armstrong
09/18/2017, 10:55 AMnil2l
09/18/2017, 12:00 PMLet's stop with this nonsense. Either by explicitly declaring the mapping (choice 2) or by avoiding the mapping altogether (choice 3).
mike_shysh
09/18/2017, 12:10 PMreline
09/18/2017, 1:34 PMmyString == null
it matches both the String?
and Int?
types. Anyone know a way around this?
fun hello(myString: String?, myBoolean: Boolean) {}
fun hello(myInt: Int?, myBoolean: Boolean) {}
fun hi(myString: String?) {
if (myString == null) {
hello(myString, false) //overload resolution ambiguity
} else {
hello(myString, true) // this works fine
}
}
anstaendig
09/18/2017, 1:38 PMkevinmost
09/18/2017, 10:00 PMorangy
09/18/2017, 10:10 PMsuspend
in 1.1 without breaking any code that might be using val suspend = shouldSuspendUser()
adams2
09/18/2017, 10:52 PMDalinar
09/19/2017, 6:20 AMedwardwongtl
09/19/2017, 8:39 AMval A.extVal get() = B(this)
Is there a way to not construct B
every time I reference to A.extVal
? Given that I don't own class A
.edwardwongtl
09/19/2017, 8:39 AMval A.extVal get() = B(this)
Is there a way to not construct B
every time I reference to A.extVal
? Given that I don't own class A
.marstran
09/19/2017, 9:06 AMlazy
-delegate, but it didn't work because you don't have access to this
inside the function you pass to it. I guess you could create your own version of the lazy
-delegate that passes the receiver object as a parameter to the function though.class LazyExtension<V, T>(val f: V.() -> T) {
data class Result<T>(val t: T)
var result: Result<T>? = null
operator fun getValue(thisRef: V, property: kotlin.reflect.KProperty<*>): T {
return result?.t ?: Result(thisRef.f()).also {
result = it
}.t
}
}
edwardwongtl
09/19/2017, 10:22 AMmarstran
09/19/2017, 10:49 AMtmp
variable.ilya.gorbunov
09/19/2017, 10:52 AMmarstran
09/19/2017, 10:54 AM