karelpeeters
02/23/2018, 3:49 PMThe general rule is: when a type parameter T of a class C is declared out, it may occur only in out-position in the members of C
Mario Ruiz
02/23/2018, 4:04 PMkarelpeeters
02/23/2018, 4:05 PMkarelpeeters
02/23/2018, 4:06 PMMario Ruiz
02/23/2018, 4:10 PMMario Ruiz
02/23/2018, 4:11 PMfred.deschenes
02/23/2018, 4:14 PM@Import(value = [String::class, Integer::class])
Mario Ruiz
02/23/2018, 4:14 PMRuckus
02/23/2018, 4:29 PM[]
in this case, so you can just do @Import(String::class, Int::class)
Ruckus
02/23/2018, 4:30 PMIf theargument in Java has an array type, it becomes avalue
parameter in Kotlinvararg
Shawn
02/23/2018, 5:08 PMRuckus
02/23/2018, 5:10 PMShawn
02/23/2018, 5:12 PMRuckus
02/23/2018, 5:16 PMMarcin Wisniowski
02/23/2018, 5:35 PMMarcin Wisniowski
02/23/2018, 5:36 PMobject : Interface {...
)cedric
02/23/2018, 5:37 PMcedric
02/23/2018, 5:38 PMelect
02/23/2018, 10:18 PMsocket
methods to TorSrocket
?
class TorSocket @JvmOverloads constructor(val desination: String,
port: Int,
streamId: String? = null,
numTries: Int = 5,
tor: Tor? = null) : Socket() {
private val socket = setup(desination, port, numTries, streamId, tor)
fuad
02/24/2018, 2:14 AMChay
02/24/2018, 6:34 AMfrellan
02/24/2018, 6:52 AMpatapon
02/24/2018, 9:05 AMkarelpeeters
02/24/2018, 9:16 AMRecursiveDescent
in the name, that's the parser. Maybe start from there and look at what it emits, and what other passes use those data structures?clubfan
02/24/2018, 2:16 PMprevMessage?.text += line
where prevMessage may be null and text as well as line are of type String
?clubfan
02/24/2018, 2:16 PMclubfan
02/24/2018, 2:18 PMprevMessage?.apply { text += line }
worksDaniel Loaiza
02/24/2018, 3:16 PMuser
02/24/2018, 3:28 PMPair
object just to call the function.user
02/24/2018, 3:34 PMfun <T, U, R> ifNotNull(first: T?, second: U?, block: (T, U) -> R): R? =
if (first != null && second != null) block(first, second) else null
println(ifNotNull("a", "b") { first, second -> first + second })