sitepodmatt
02/15/2019, 5:02 AMsitepodmatt
02/15/2019, 5:02 AMjeremy
02/15/2019, 5:15 AMsitepodmatt
02/15/2019, 5:44 AMsitepodmatt
02/15/2019, 5:44 AMjw
02/15/2019, 3:56 PMsitepodmatt
02/20/2019, 9:25 AMdiesieben07
02/20/2019, 9:28 AMSomeType
is an interface you can do interface MyInterface : SomeType
. Otherwise what you want is not possible and you probably want an abstract class instead.karelpeeters
02/20/2019, 2:40 PMLazy
instance (ie. the delegate) and its state be stored?Ruckus
02/20/2019, 6:15 PMContracts are only allowed on top level functionsI don't recall reading about this limitation anywhere.
karelpeeters
02/20/2019, 6:20 PMRuckus
02/20/2019, 6:28 PMMicah Church
02/21/2019, 3:40 AMGustavo Maciel
02/21/2019, 11:10 AMHasan
02/21/2019, 3:36 PMHasan
02/21/2019, 3:38 PMDico
02/24/2019, 1:10 PMclass Foo(var af: Short) {
val a get() = (af and 0xff).toByte()
set(value) { af = ((af.toInt() and 0xff00) or (value.toInt() and 0xff)).toShort() }
val f get() = (af ushr 8).toByte()
}
jkbbwr
02/24/2019, 1:12 PMDico
02/24/2019, 1:12 PMkarelpeeters
02/24/2019, 1:12 PMushr
really matter? You're right about the 8
and 0xFf
of course simple smilejkbbwr
02/24/2019, 1:13 PMjkbbwr
02/24/2019, 1:13 PMjkbbwr
02/24/2019, 1:13 PMDico
02/24/2019, 1:14 PMushr
regardless when you're just selecting some bits. It hurts my head to think whether it matters or not 😂karelpeeters
02/24/2019, 1:14 PMDico
02/24/2019, 1:15 PMInt
everywhere. Alternatively, UInt will do.jkbbwr
02/24/2019, 1:15 PMjkbbwr
02/24/2019, 1:15 PMjkbbwr
02/24/2019, 1:15 PMDico
02/24/2019, 1:15 PMInt
over Short
or Char
or whatever.