Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some tests were using files that others called blackBoxFile() on. Since those files are now moved to box/, copy them back to make the tests pass
- Loading branch information
Showing
5 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class S(val a: String, val b: String) { | ||
fun component1() : String = a | ||
fun component2() : String = b | ||
} | ||
|
||
fun S.component3() = ((a + b) as java.lang.String).substring(2) | ||
|
||
class Tester() { | ||
fun box() : String { | ||
val (o,k,ok,ok2) = S("O","K") | ||
return o + k + ok + ok2 | ||
} | ||
|
||
fun S.component4() = ((a + b) as java.lang.String).substring(2) | ||
} | ||
|
||
fun box() = Tester().box() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fun box() = IssueState.DEFAULT.ToString() + IssueState.FIXED.ToString() | ||
|
||
enum class IssueState { | ||
DEFAULT | ||
FIXED { | ||
override fun ToString() = "K" | ||
} | ||
|
||
open fun ToString() : String = "O" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
enum class State { | ||
O | ||
K | ||
} | ||
|
||
fun box() = "${State.O.name()}${State.K.name()}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
enum class Season { | ||
WINTER | ||
SPRING | ||
SUMMER | ||
AUTUMN | ||
} | ||
|
||
fun foo(): Season = Season.SPRING | ||
|
||
fun box() = | ||
if (foo() == Season.SPRING) "OK" | ||
else "fail" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters