Slackbot
02/23/2018, 12:17 PMOlekss
02/23/2018, 12:30 PMDominik.sittel
02/23/2018, 2:22 PMrrader
02/23/2018, 3:14 PMval `application json` = "application/json" // works
val `application/json` = "application/json" // not works
karelpeeters
02/23/2018, 3:37 PMNames of methods, fields, and local variables are stored as unqualified names. An unqualified name must not contain any of the ASCII characters . ; [ / (that is, period or semicolon or left square bracket or forward slash).
Kulwinder Singh
02/23/2018, 3:54 PMsujin
02/23/2018, 4:36 PMmainBinding.setVariable(BR.temp, temp)
BR.temp gives unresolved referenceRuckus
02/23/2018, 5:06 PMkotlin.math.roundToInt()
crash on NaN
instead of returning 0
like Java does?Shawn
02/23/2018, 5:07 PMInt
, returning IEEE 754 NaN
would be a type error, right? so to speak, anyhowJoe
02/24/2018, 1:01 AMpatapon
02/24/2018, 9:05 AMclubfan
02/24/2018, 2:18 PMursus
02/25/2018, 12:51 AMursus
02/25/2018, 1:36 AMRobert Brown
02/25/2018, 3:08 AMrobstoll
02/25/2018, 12:41 PMclass A{}
fun A.test(i: Int): Int = 1
@Deprecated("use new fun which returns int")
fun test(a: A, i :Int): Float = 1.1f
fun main(vararg args: String){
val a = A()
a.test(1)
test(a, 1)
}
mkodekar
02/25/2018, 3:36 PMgaetan
02/25/2018, 3:37 PMPere Casafont
02/25/2018, 6:48 PMtschuchort
02/25/2018, 7:01 PMorg.jetbrains.kotlin.serialization.ProtoBuf
and org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf
?karelpeeters
02/26/2018, 2:28 PMdata class Test(val num: Int) {
fun other(): Int {
println("hit")
return num + 5
}
}
Is there an elegant way to achieve something like list.first { it.other() > 5 }.other()
, but without having to call other
twice? list.map { it.other() }.first { it > 5 }
is also not really what I want, I basically want the minimum possible of other
calls.kevin.cianfarini
02/26/2018, 9:55 PMursus
02/27/2018, 2:48 AMJasonB
02/27/2018, 5:19 PMndv
02/27/2018, 5:22 PMMyClass::myFunction
returns a different type to MyClass::class.functions.find{myFunction}
- I only have access to the reflected classes and the code that's going to be calling these functions works perfect when I use MyClass::myFunction
, however when i get hold of the function via MyClass::class.functions
it expects more arguments than the actual function. Any way I can get to the same reflected function as MyClass::myFunction
from MyClass::class.functions
? Thankstipsy
02/27/2018, 8:15 PMpoohbar
02/28/2018, 1:01 AM"
?
method name is: fun 'should do something with "this" and return zero'()
(using single quotes instead of backticks)
It works fine on mac but on windows it throws:
Error:Kotlin: [Internal Error] java.lang.IllegalStateException: java.io.FileNotFoundException: C:\path\to\file\MyTest$should do something with "this" and return zero$1.class (The filename, directory name, or volume label syntax is incorrect)
at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:24)
at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:74)
orangy
ziggy42
02/28/2018, 9:24 AMjavaClass
equal to SomeClass::class.java
?beatbrot
02/28/2018, 9:49 AM