This file contains hidden or 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
| public final class StringKtTestKt { | |
| @NotNull | |
| public static final String removeWhitespaces(@NotNull String $receiver) {} | |
| } |
This file contains hidden or 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
| String foo = "Piotr Slesarew"; | |
| StringKtTestKt.removeWhitespaces(foo); |
This file contains hidden or 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
| val collection = listOf("Piotr", "Slesarew") | |
| collection.reversed() | |
| .forEach(::println) |
This file contains hidden or 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
| val collection = listOf("Piotr", "Slesarew") | |
| collection.reversedForEach(::println) | |
| fun <T> Iterable<T>.reversedForEach(action: (T) -> Unit): Unit { | |
| for (element in this.reversed()) action(element) | |
| } |
This file contains hidden or 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
| package com.code.sliski.userinfoscreen.ui | |
| import ... | |
| import android.view.View // Conflict | |
| class UserInfoFragment : Fragment(), com.code.sliski.userinfoscreen.ui.View { // Conflict | |
| override fun onCreateView(inflater: LayoutInflater, | |
| container: ViewGroup?, |
This file contains hidden or 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
| import android.view.View as AndroidView // Named import | |
| class UserInfoFragment : Fragment(), View { | |
| override fun onCreateView(inflater: LayoutInflater, | |
| container: ViewGroup?, | |
| state: Bundle?): AndroidView = // Using named import | |
| } |
This file contains hidden or 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
| // Main.java | |
| public static void main(String[] args) { | |
| String name = null; | |
| AnyKt.ifNull(name, new Function1<Object, Unit>() { | |
| @Override | |
| public Unit invoke(Object o) { | |
| return null; | |
| } | |
| }); |