blob: 5206e10e37d4a51f2ff3d38c7a162995605d73c1 [file] [log] [blame]
Tiem Songe1dd5122019-07-03 14:16:39 -07001// this file is not included in sources or tests, you can play with it for debug purposes
2// Console run configuration will analyse it and provide lots of debug output
3package dokka.playground
4
5fun topLevelFunction() {
6}
7
8val topLevelConstantValue = "Hello"
9
10val topLevelValue: String
11 get() = "Bye bye"
12
13var topLevelVariable: String
14 get() = "Modify me!"
15 set(value) {
16 }
17
18/**
19 * This is a class
20 */
21class Class {
22 fun memberFunction() {
23 }
24
25 val memberValue = "Member"
26}
27
28/**
29 * This is a class with constructor and space after doc
30 */
31
32class ClassWithConstructor(
33 /** Doc at parameter */ val name: Class)
34
35/**
36 * This is data class with constructor and two properties
37 * Also look at [Employee]
38 *
39 * $name Person's name
40 * $age Person's age
41 *
42 */
43data class Person(val name: ClassWithConstructor, val age: Int) {}
44
45data class Employee(val name: ClassWithConstructor, val age: Int) {}
46
47object Object {
48 throws(javaClass<IllegalArgumentException>())
49 fun objectFunction() {
50 }
51
52 val objectValue: String
53 /** one line getter doc */
54 get() = "Member"
55
56 public val String.valueWithReceiver: Int
57 get() = 1
58
59}
60
61enum class Color(r: Int, g: Int, b: Int) {
62 Red : Color(100,0,0)
63 Green : Color(0,100,0)
64 Blue : Color(0,0,100)
65}
66
67class OuterClass {
68
69 /**
70 * $T type of the item
71 */
72 class NestedClass<T> {
73 fun nestedClassFunction(item: T) {
74 }
75
76 fun String.functionWithReceiver(): Int = 1
77
78 }
79
80 inner class InnerClass {
81 open fun innerClassFunction<
82 /** doc for R1 type param */
83 R1,
84 /** doc for R2 type param */
85 R2
86 >() {
87 }
88 }
89
90 object NestedObject {
91 protected open fun nestedObjectFunction() {
92 }
93 }
94}
95
96trait Interface {
97 fun worker()
98 val extra: String
99}