mg6maciej
02/21/2017, 1:00 PMdragas
02/21/2017, 1:00 PMPaul Woitaschek
02/21/2017, 1:01 PMPaul Woitaschek
02/21/2017, 1:01 PMdragas
02/21/2017, 1:01 PMthis
to access caller property. 😄mg6maciej
02/21/2017, 1:03 PMnull as Any?
.mg6maciej
02/21/2017, 1:04 PMaimozg
02/21/2017, 1:05 PM// prefix not-null check with !!expr
inline operator fun Any?.not() = this == null
(Don't try this at home. Or in production. Or anywhere else)adambl4
02/21/2017, 1:09 PMdragas
02/21/2017, 1:13 PMvar property : Int
get(){
property
}
set(value) {
property = value
}
miha-x64
02/21/2017, 1:14 PMdragas
02/21/2017, 1:14 PMfield
instead of property
.bernhard
02/21/2017, 1:17 PMfun Any?.to() : Boolean {
return this != null
}
bernhard
02/21/2017, 1:18 PMfun <T> <http://T.to|T.to>() : Boolean {
return this != null
}
jmfayard
02/21/2017, 1:32 PMrobin
02/21/2017, 1:39 PMrobin
02/21/2017, 1:39 PMwenn
to falls
. Matches the intention more closely.robin
02/21/2017, 1:41 PMcondition
, ifBlock
etc. in English 😛mikehearn
02/21/2017, 1:41 PMuser
02/21/2017, 1:42 PMpasssy
02/21/2017, 1:42 PMpasssy
02/21/2017, 1:42 PMhttps://pascaldropshare.s3-eu-central-1.amazonaws.com/ztPhtrpRx5.png▾
passsy
02/21/2017, 1:42 PMhttps://pascaldropshare.s3-eu-central-1.amazonaws.com/xWv8QJ3KKx.png▾
Paul Woitaschek
02/21/2017, 1:43 PMPaul Woitaschek
02/21/2017, 1:45 PMPaul Woitaschek
02/21/2017, 1:46 PMPaul Woitaschek
02/21/2017, 1:46 PMSomeClass.SOME_CONSTANT
. Now there is SomeClass.Companion.getSOME_CONSTANT()
mg6maciej
02/21/2017, 1:46 PMmg6maciej
02/21/2017, 1:46 PM@JvmField
robin
02/21/2017, 1:47 PM@JvmStatic
to get static behavior if you need it.