ylemoigne
02/28/2018, 12:08 PMsomeList.map(::Foo)
and someList.map { Foo(it) }
?janvladimirmostert
02/28/2018, 4:19 PMpoohbar
02/28/2018, 4:48 PMagrosner
02/28/2018, 6:29 PMursus
03/01/2018, 4:19 AMribesg
03/01/2018, 7:42 AMhhariri
Arun
03/01/2018, 2:36 PMbuildString()
?
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/build-string.htmllocke
03/01/2018, 3:57 PMJoakim Fast
03/01/2018, 4:33 PMShawn
03/01/2018, 5:44 PM@kotlin
hasn’t posted that yetbrabo-hi
03/01/2018, 5:49 PMpoohbar
03/01/2018, 6:46 PMfun `hi hello`()
The name of the function now has a suggestion on it: "Remove redundant back ticks". They are not redundant and the action does nothing. Could anyone confirm?tschuchort
03/01/2018, 7:01 PMvlad
03/01/2018, 9:30 PMjtravis
03/01/2018, 11:15 PMwhen
exhaustively when looking through some sealed classes, but there is no real result from each of the when
clauses. The best I can currently do appears to be below:
val someVariableThatDoesntDoAnything = when(some) {
is FirstClass -> {}
is SecondClass -> {}
}
It seems like it would be nice to allow val _ = when(some) { ... }
jermainedilao
03/02/2018, 3:13 AMsindrenm
03/02/2018, 12:50 PMas? String
and as String?
? simple smile)Andreas Sinz
03/02/2018, 2:32 PMorangy
ylemoigne
03/02/2018, 6:33 PMFoo
out of my control which has a method named div(Bar bar)
; Kotlin seems to allow the usage of this method as an operator
. But this method, is not really what you can expect for a division. And I would like to implement the operator fun Foo.div(bar:Bar)=division(bar)
to get the right action.... But as div
exist, the extension is shadowed. I suppose I'm completely out of luck ? (No way to tell kotlin that the div()
method in the class is not an operator method ?)patapon
03/03/2018, 12:02 PMylemoigne
03/03/2018, 5:02 PMPackage name does not match containing directory
vs In pure Kotlin projects, the recommended directory structure is to follow the package structure with the common root package omitted
). And is there a way to give IntelliJ the "base" package for new files under root ?tipsy
03/03/2018, 8:12 PMby lazy
supposed to work when calling from java?ylemoigne
03/03/2018, 8:15 PM/
in it)liz3
03/04/2018, 1:47 AM@FXML
private ListView<String> entriesList;
@FXML
private TextField hostField;
@FXML
private TextField nameField;
@FXML
private PasswordField passField;
@FXML
private TextField pathField;
@FXML
private Button testConnBtn;
@FXML
private Button saveBtn;
@FXML
private Button delBtn;
@FXML
private Button saveNewBtn;
@FXML
private TextField customPath;
@FXML
private ComboBox<String> typeBox;
cedric
03/04/2018, 4:31 AMlateinit
is very useful when your objects are being managed by a container, and containers typically separate object instantiation from object initializations. Some example containers would be Android, the servlet spec, and probably many others. Technically, lateinit
has nothing to do with Java and nothing to do with dependency injection.karelpeeters
03/04/2018, 3:23 PMmore values are of typeBut less values are of typecompared toAny
String
(Any) -> Unit
then of (String) -> Unit
, so the former is more specific.CodeIsmail
03/04/2018, 8:41 PMjcminarro
03/04/2018, 9:18 PMwhen
expresion and I would like to share with you and see what you think about it.
I have created a repo that reproduces the problem that I had, you can check here: https://github.com/JcMinarro/SealedClass
The problem was with some Sealed Class that has some object class
. The IDE, when autocomplete the remaining branches, if some of the cases is an object class
doesn't add the is
operator at the beginning. I though that the operator is
was redundant when it was used inside of when
with an object class
but It is not the same. I had the problem when I serialized/deserialized that object class
and I could see that I got a kotlin.NoWhenBranchMatchedException