-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathsource.kt
More file actions
38 lines (27 loc) · 822 Bytes
/
source.kt
File metadata and controls
38 lines (27 loc) · 822 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
class Test {
val text1: String = "abc \' def \u0000 \n \" hehe "
val text2: List<Char> = listOf('a', '\n', '\'', '"', '\"')
val numbers = listOf(0, 12, 1.0f, 1.0, 1L, 0x1f, -1, -12, -1.0f, -1.0, -1L)
val template = "abc${1 + "b"}def"
val template2 = "abc${1 + 'b'}def"
val template3 = "abc $var def"
val multiline = """ first line $var ${1 + 1}
second line
and quotes: ' " '' "" ok
"""
val innerBraces = " before ${ if (true) { 1 } else { 2 } }"
var v: Int = 0
fun function(): ReturnType {
}
fun <T : Any> parametrizedFunction(): T = TODO()
fun references() {
super.references()
this.references()
}
@Annotation
class Annotated
inner class Inner<in T, out E>
object O
companion object {
}
}