Ad
  • Custom User Avatar

    Anybody can tell me how is it works? Please!

  • Custom User Avatar

    Ok, there seems to be a misunderstanding right from the beginning so I'll amend on this.

    • You're right about the warning.
    • though that doesn't prevent the executions of the tests neither passing the kata successfully (I don't do kotlin myself, so that's what I expected to find when you raised an issue)
    • that could have been raised as a suggestion rather than an issue, then.
    • "This causes an impossible solution." -> that's where I stopped reading, since the tests passed.

    Well, warning causes handled.

    Sorry for the misunderstanding. But next time, jump on the "discussion button" rather than on the downvote one. The latter doesn't help to make a constructive discussion.

  • Custom User Avatar

    Totally, it's totally not happening at line 62 of fixture.kt. Nope. Not happening at all.

  • Custom User Avatar

    see below.

  • Custom User Avatar

    I'm tired of all those... "people", that (sic) think they are right when they cannot even prove the least of it.

    • I just tried already existing solutions
    • passing the sample tests
    • passing the test cases

    no casting problem anywhere.

    Meaning that you're completely wrong, whatever you might think.

  • Custom User Avatar

    Kotlin

    The tests fail.

    The tests are passing an unchecked casted Array of String? to the function argument declared as Array of String. This causes an impossible solution. Change the function stub to take Array of String? then all the other tests fail as they are trying to pass in the wrong type. The issue isn't resolved because the tests are still wrong not only from an actual assertion standpoint but from an actual coding practice standpoint.

  • Custom User Avatar

    It also has bugs in Kotlin.

  • Custom User Avatar

    Kotlin

    The tests fail.

    The tests are passing an unchecked casted Array of String? to the function argument declared as Array of String. This causes an impossible solution. Change the function stub to take Array of String? then all the other tests fail as they are trying to pass in the wrong type. The issue isn't resolved because the tests are still wrong not only from an actual assertion standpoint but from an actual coding practice standpoint.

  • Custom User Avatar

    Hi,

    This tells me you're new on CW... x)

    If you post issues, do it right:

    • provide ALL the useful information:
      • language
      • input
      • outputs (actuel expected) when relevant
      • error message when relevant
    • check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
    • if you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)

    Closing for now, since this looks like an invalid issue. Feel free to reopen if you're sure that's an actual issue (documented, this time ;) )

    Note:

    • Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
    • Suggestions: well, I guess that part is clear
    • Question anything else that is related to you having a problem solving a kata.

    cheers

  • Custom User Avatar

    That's Kotlin isn't it?

  • Custom User Avatar

    fixture.kt:62:17: warning: unchecked cast: Array<String?> to Array
    return a1 as Array

    This tells me there is something wrong with this.

  • Custom User Avatar

    Your task is to return the first longest string consisting of k consecutive strings taken in the array.

    Do you see the first there? You have to return boatshoes in that case (if k is 2 ofc).

  • Default User Avatar

    Print the input.

  • Custom User Avatar

    It's particularly hard to figure out what's wrong with a test without seeing the input for the tests, regarding the Kotlin tests. I haven't tried it with another language but my solution seems sound but I'm failing 2 tests without any info to lead into what is wrong other than "expected but found" which doesn't help if I don't know the input.