jermainedilao
03/02/2018, 3:13 AMjermainedilao
03/02/2018, 3:13 AMbenleggiero
03/02/2018, 3:48 AMval x = (foo as? Foo<Bar>) ?: Foo<Bar>() // foo was declared as foo: FooType, where FooType is a generic constraint of Foo
I get this?
Unchecked cast: FooType to Foo<Bar>
Isn’t as?
checking stuff? Or am I misunderstanding?Shawn
03/02/2018, 3:49 AMas?
doesn’t perform a check, it just attempts to cast and on failure returns null
jermainedilao
03/02/2018, 3:50 AMbenleggiero
03/02/2018, 3:50 AMShawn
03/02/2018, 3:53 AMShawn
03/02/2018, 3:55 AMShawn
03/02/2018, 3:57 AMList<Int>
to List
, but that’s still an unchecked cast, ya feel?benleggiero
03/02/2018, 4:08 AMbenleggiero
03/02/2018, 4:08 AMhallvard
03/02/2018, 7:13 AM:quit
. In both cases, my console just hangs, and I have to press CTRL-C to go on. Is this known/intended/reported?dharmendrajadon
03/02/2018, 10:15 AMjkbbwr
03/02/2018, 12:29 PMjkbbwr
03/02/2018, 12:33 PMjkbbwr
03/02/2018, 12:33 PMjkbbwr
03/02/2018, 12:42 PMmannodermaus
03/02/2018, 12:42 PMjkbbwr
03/02/2018, 12:43 PMmannodermaus
03/02/2018, 12:43 PMjkbbwr
03/02/2018, 12:45 PMjwalgemoed
03/02/2018, 12:49 PMclass Experiment {
lateinit var stuff: String
}
sindrenm
03/02/2018, 12:49 PMval x: String? = y as? String
and val x: String? = y as String?
. Anyone got an example that might help me understand? ❤️jwalgemoed
03/02/2018, 12:50 PMjwalgemoed
03/02/2018, 12:50 PMjkbbwr
03/02/2018, 12:51 PMjwalgemoed
03/02/2018, 12:52 PMjkbbwr
03/02/2018, 12:52 PMjwalgemoed
03/02/2018, 12:52 PMjwalgemoed
03/02/2018, 12:53 PM