sreich
01/02/2017, 4:37 PMKirill Zhukov
01/03/2017, 3:21 AMnatpryce
01/03/2017, 12:30 PMnatpryce
01/03/2017, 12:32 PMelect
01/06/2017, 10:30 AMelect
01/06/2017, 10:30 AMpasssy
01/06/2017, 2:00 PMpasssy
01/06/2017, 2:00 PMhttps://pascaldropshare.s3-eu-central-1.amazonaws.com/nnK7omHyiE.png▾
passsy
01/06/2017, 2:00 PMoluwasayo
01/07/2017, 2:33 PMNew Kotlin File/Class Dialog▾
Kind
dropdown default to the last kind selected? For people who create many Kotlin classes and who don't like to click this thing every time, this might be helpful.pawel.barszcz
01/07/2017, 3:12 PMKind
even if Name
is focuseddstarcev
01/07/2017, 7:32 PMchristophsturm
01/08/2017, 11:19 AMdstarcev
01/09/2017, 10:13 AMalex0ptr
01/09/2017, 1:44 PMlist.asSequence()
.filter{}
it auto completes with curly braces after filter. However I feel that many times I want to use Function references. Which means I need to delete the curly braces and replace them with parentheses. Is there a way to change the completion to not generate braces or parentheses?alex0ptr
01/09/2017, 1:44 PMalex0ptr
01/09/2017, 1:46 PMkirillrakhman
01/09/2017, 2:58 PMkirillrakhman
01/09/2017, 3:00 PMfilter({})
, filter() {}
and filter {}
are the same thing. the last version is the preferred one. this also works if you have multiple lambda arguments, but only for the last one. so you can only do foo({}) {}
but not foo {} {}
kirillrakhman
01/09/2017, 3:01 PMfoo { -> }
and foo {}
is the same as well as foo { a -> a }
and foo { it }
kirillrakhman
01/09/2017, 3:02 PMkirillrakhman
01/09/2017, 3:06 PM() -> T
and friends, the correct term is "function types"alex0ptr
01/09/2017, 3:12 PMjmfayard
01/09/2017, 9:59 PMnamed arguments▾
crop(top = 0, left=200, bottom=400, right=600)
would make this statement more readable
But since it's a java function, named arguments are not allowed.
Could the IDE displays them nonetheless as it does it in java when the option Inline parameters for litteral call arguments
is set?yole
01/09/2017, 10:00 PMdsgryazin
01/10/2017, 11:40 AM?
are lost for unknown reason, maybe during migrations to kotlin or just Java code returns null
too unexpectedly)
I don't understand how kotlin plugin warns about that - I've found only "Function or property has platform type"
inspection, but i have no warnings at all for this code:
Java:
public class TestClass {
private Integer i1;
private Integer i2;
public TestClass(Integer i1, Integer i2) {
this.i1 = i1;
this.i2 = i2;
}
}
Kotlin
class TestClient {
val x: Int? = null
fun foo() {
val java = TestClass(x, x)
}
}
kirillrakhman
01/10/2017, 11:51 AMkirillrakhman
01/10/2017, 11:52 AMTestClass
can handle nulls. If you annotate the parameters of the java class with @NotNull
then a warning/error will appear on the kotlin sidedsgryazin
01/10/2017, 12:06 PM@NonNull
(And I shouldn't really do it because of OCP). I guess it'd be enough to look through only the places, where kotlin uses the java code with platform types and remove those NPE-generating platform types where needed.
@yole I don't like platform types😢 Hear my pain😊dsgryazin
01/10/2017, 12:08 PM