Ad
  • Default User Avatar

    Taking the below test case as an example I can't figure out why "zero" is lower case in the solution. As the fourth index in the number it seems that it should be upper case, or if we are only to look at the number of writen out numbers, then it is the second index of that so it should be uppercase. Could someone please offer an explination as to why it is lower case in the solution?

    test.assert_equals(conv(47309534), "f73zero953fourFOUR")

  • Default User Avatar

    Thank you for taking the time to investigate it if I can make the same thing happen again I will thouroghly document it and report the issue.

  • Default User Avatar

    I tried several solutions that worked fine.
    You passed the kata and your solution got warnings:

    solution.swift:6:5: warning: initialization of variable 'key' was never used; consider replacing with assignment to '_' or removing it
    var key=0;
    ~~~~^~~
    _
    solution.swift:7:7: warning: initialization of variable 'locSpace' was never used; consider replacing with assignment to '_' or removing it
      var locSpace=0
      ~~~~^~~~~~~~
      _
    

    It's not a kata issue but if you think the compiler is at fault you can report a bug at:https://github.com/Codewars/codewars.com/issues.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Now, this is interesting. Can you share your code so the issue could be investigated and reported as the potential runner bug?
    Also, there's no Swift 5.2 available for me?

  • Default User Avatar

    This is more of a compiler error than an error with the kata. In swift 5.2 I had a line creating the final output string that I missed the type cast from Int to String and instead of throwing an error that I can't add an Int to a String it was just timing out. The compiler would also time out if i did the typecast in the same string building line.