Davide Giuseppe Farella
01/27/2019, 1:53 PMcompanion object
?
testing the function I got a java.lang.NoSuchMethodError
whenever I call a const
from the companion
, replacing with its String
everything runs flawlesslyDavide Giuseppe Farella
01/27/2019, 1:54 PMDavide Giuseppe Farella
01/27/2019, 1:55 PMcorneil
07/06/2019, 12:13 AMgradle/wrapper/gradle-wrapper.properties
Nir
07/06/2019, 1:09 AMNir
07/06/2019, 7:28 PMNir
07/06/2019, 7:28 PMNir
07/06/2019, 7:28 PMvar x = mutableListOf<String>()
x += "hello"
Nir
07/06/2019, 7:28 PMNir
07/06/2019, 7:29 PMstreetsofboston
07/06/2019, 7:51 PMAdam Powell
07/06/2019, 7:55 PMvar
reference to the collection and the collection itself be mutable. Generally your code is better off if you pick one of those or the other, and in cases where both really is appropriate, being explicit with .add
is easier to read at a glanceNir
07/06/2019, 8:39 PMNir
07/06/2019, 8:39 PMNir
07/06/2019, 8:40 PMAdam Powell
07/06/2019, 8:41 PM.add
helps readabilityNir
07/06/2019, 9:02 PMNir
07/06/2019, 9:02 PMNir
07/06/2019, 9:02 PMNir
07/06/2019, 9:03 PMNir
07/06/2019, 9:05 PMNir
07/06/2019, 10:51 PMhalirutan
07/07/2019, 12:14 AMhalirutan
07/07/2019, 12:18 AMNir
07/07/2019, 3:39 PMn + { foo() }
do not compile it seemsredrield
07/07/2019, 10:11 PMuser
07/08/2019, 8:23 AMFlorian
07/08/2019, 11:52 AMFlorian
07/08/2019, 11:52 AMFlorian
07/08/2019, 6:04 PM