jdemeulenaere
07/08/2019, 1:27 PMNicholas Bilyk
07/08/2019, 3:03 PMincludeBuild("../acornui") {
dependencySubstitution {
substitute(module("com.acornui:acornui-utils-metadata")).with(project(":acornui-utils"))
substitute(module("com.acornui:acornui-utils-jvm")).with(project(":acornui-utils"))
substitute(module("com.acornui:acornui-utils-js")).with(project(":acornui-utils"))
}
}
This actually works as far as building is concerned, but the IDE doesn't accept the substitution. Any suggestions for where I can go from here?Nir
07/08/2019, 3:12 PMobject
and companion objects, philosophicallyFlorian
07/08/2019, 6:04 PMmp
07/08/2019, 6:11 PM(T) -> Unit
and a producer () -> T
. I want to store pairs of those, but with a different T
for each pair.camdenorrb
07/08/2019, 8:05 PMcamdenorrb
07/08/2019, 8:26 PMTuan Kiet
07/09/2019, 1:21 AM@Target(
AnnotationTarget.FIELD,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY_GETTER,
AnnotationTarget.PROPERTY_SETTER
)
annotation class FieldName(
val value: String
)
data class UserEntity(
@FieldName("userName") val userName: String
)
somehow UserEntity::userName.annotations
return an empty list. What did I do wrong?ValV
07/09/2019, 8:08 AMRegexCompleter("SomeCoolRegexString", myHashMap::get)
. I've read from 😒tackoverflow: that Kotlin does not support method reference on objects. How to convert to Kotlin?Mohamed Ibrahim
07/09/2019, 1:05 PMwhen
is the right choice .. what I need to achieve something like this
when ( lang ) {
equalIgnoreCase "AR" -> "Arabic"
equalIgnoreCase "EN" -> "English"
equalIgnoreCase "RU" -> "Russian"
}
thana
07/09/2019, 1:51 PMval
from an interface be overwritten as var
in the implementation?Nir
07/09/2019, 2:32 PMrobstoll
07/09/2019, 5:23 PMfun <R> foo(f : ()-> R) = f ()
specify that foo takes over the contract of f
StevieB
07/09/2019, 6:44 PMnfrankel
07/09/2019, 8:20 PMfun foo( (vararg args: Any?) -> Unit) = ...
Nir
07/09/2019, 8:42 PMjw
07/09/2019, 9:09 PMHullaballoonatic
07/10/2019, 3:16 AMinterface Foo {
var recentBar: Int
protected val onBar: (Int) -> Int
fun bar(x: Int): Int {
recentBar = onBar(x)
return recentBar
}
}
I don't intend this as a suggestion, per say, hence why posting here. I assume there's an important (paradigmatic?) reason I'm missing for why such a suggestion is a terrible idea.Evgeniy Zaharov
07/10/2019, 7:11 AMdata class
contains params with inline
classes. For deserialisation I use jackson
and it fail with it. But then I try to discover a problem I found that this data class
compile to class with private main constructor. Is it expected behaviour or bug (for me at lease, and feature for others)? It seems not right solutions for it, because for initialisation of Outer
class kotlin compile use synthetic method with DefaultConstructorMarker
witch doesn’t contains any additional check for inline params and only calls private constructor after. Why just not make main constructor public
and use it for initialisation?
Simple example for reproduce is below:
inline class InlineValue(val value: String)
data class Outer(
val value: Int,
val inlineValue: InlineValue
)
and in will be compiled to:
public final class Outer {
...
private Outer(int value, String inlineValue) {
this.value = value;
this.inlineValue = inlineValue;
}
...
}
yayabobi
07/10/2019, 12:57 PMAndrew Gazelka
07/10/2019, 1:07 PMflowOf(1, 1.0, 2, 2.0)
)… don’t understand the &
thiagoretondar
07/10/2019, 2:23 PMdata class Property(
val name: String,
val value: String
)
data class Element(
val name: String,
val properties: List<Property>?,
val elements: List<Element>? ---> REFERENCE ITSELF
)
Ruckus
07/10/2019, 2:28 PMa: List<A>
and want an equal amount of `B`s (that don't depend on A
. Do you prefer:
1️⃣ a.map{ B() }
2️⃣ List(a.size) { B() }
Nir
07/10/2019, 2:33 PMinline fun <reified T> foo() : Int {
return T.bar
}
Basically, a way to access values, functions, etc, from the type itself, instead of from an instance of that type.kartikpatodi
07/10/2019, 4:33 PMredrield
07/10/2019, 8:32 PMAndrew Gazelka
07/11/2019, 2:55 AMAndrew Gazelka
07/11/2019, 4:38 AM.copy(...)
ValV
07/11/2019, 5:50 AM<http://System.in|System.in>
, System.out
?ValV
07/11/2019, 8:05 AMtypealias
?
typealias Consumer<T> = (T) -> Unit
callbacks = listOf<Consumer<MyType>>()
ValV
07/11/2019, 8:05 AMtypealias
?
typealias Consumer<T> = (T) -> Unit
callbacks = listOf<Consumer<MyType>>()
karelpeeters
07/11/2019, 8:08 AMlistOf<(MyType) -> Unit>()
ValV
07/11/2019, 8:11 AM