• r

    robstoll

    2 years ago
    maintaining two API styles means more work and therefore we currently consider to drop the infix API. infix users, please react with a 👍 here https://github.com/robstoll/atrium-roadmap/issues/71#issuecomment-585808643 and add your voice if you want
    r
    1 replies
    Copy to Clipboard
  • k

    keturn

    2 years ago
    hooray the new thing!
    k
    r
    14 replies
    Copy to Clipboard
  • e

    electrolobzik

    2 years ago
    I have some errors on regular run, fixing. Will come back.
    e
    r
    28 replies
    Copy to Clipboard
  • e

    electrolobzik

    2 years ago
    @robstoll when you say “run gradle” do you mean just build the project or some other thing to do?
    e
    1 replies
    Copy to Clipboard
  • Anes

    Anes

    2 years ago
    Hi, I am tried to clone the project and build it, when I try to sync the project it fails with no output. Building it using command line works fine and all the tests passes. my work envirement is: jdk 8, intellij 2020.1.3.
    Anes
    r
    18 replies
    Copy to Clipboard
  • Anes

    Anes

    2 years ago
    Hi, I am working on this issue [479] and I need some help implementing
    toVarArg
    method it should accept a
    IterableLike<T>
    which is
    Any
    , then I need to check its type and return
    Pair<T, Array<out T>>
    my current solution looks like this (below 👇), I want to know if I am on the right path or I need to rethink this solution, any tips would be appreciated. Thank you for your time.
    inline fun <reified T> toVarArg(iterable: IterableLike<T>): Pair<T, Array<out T>> {
        when (iterable) {
            is Iterable<*> -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is Sequence<*> -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is Array<*> -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is ByteArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is CharArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is ShortArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is IntArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is LongArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is FloatArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is DoubleArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            is BooleanArray -> {
                val mappedIterable = iterable.map { it as T }.asIterable()
                return mappedIterable.first() to mappedIterable.drop(1).toTypedArray()
            }
            else -> throw IllegalArgumentException("toVarArg accepts arguments of types Iterable, Sequence, Array")
        }
    Anes
    r
    3 replies
    Copy to Clipboard
  • r

    robstoll

    1 year ago
    It would not have failed in case of your example if you used toBeNullIfNullGiveElse(null)
    r
    1 replies
    Copy to Clipboard
  • r

    robstoll

    1 year ago
    The name of the function is not the best as you proved. In case someone has a better name then please share your idea
    r
    j
    6 replies
    Copy to Clipboard
  • s

    Sohel Shaikh

    11 months ago
    @robstoll Could you please help me with this? https://kotlinlang.slack.com/archives/C0B8MA7FA/p1633176380281200
    s
    r
    4 replies
    Copy to Clipboard
  • r

    robstoll

    4 months ago
    are you still using jdk8 also in tests?
    r
    d
    5 replies
    Copy to Clipboard