-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathideas.txt
26 lines (22 loc) · 1.15 KB
/
ideas.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
explain bugs/nan
* mockk() { var } vs local var - which one is taken?
* crossinline
* sealed class with open sibling, and another class that extends it
* How to resolve overload ambiguity in method references?
* Property annotations - where do they get?
* file.listFiles().filter { it.endsWith(".xml") } not same as it.name.endsWith(".xml")
* !it.geoTagged.apply { if (this) print("true") } vs (!it.geoTagged).apply { if (this) print("true") }
* Something with in/out generics?
* Coroutines? e.g. delay() in restricted suspension?
* fun foo(f: () -> String = fun() = "hh") = f()
* kotlin.Unit vs kotlin.UInt
Some more obscure features:
* overridden open method is also open by default, can be declared final
* cannot call super of extension function
* inner non-static class (inner keyword)
* syntax: type String -> () -> () -> String
* inline function, noinline parameter (to e.g. pass futher)
Kotlin/JS:
* cannot have a class name with spaces in ``
* no way to create instance of KClass/JsClass (workaround: js("new constructor()"))
* accessing of protected fields in companion object from subclass is "not supported", but compiles with @JvmStatic and fails at runtime