xref: /aosp_15_r20/external/dokka/runners/gradle-integration-tests/testData/basic/src/main/kotlin/demo/HelloWorld.kt (revision 1b2d298c530bf0473cc943e8414a5ff577a994bc)

<lambda>null1 package demo
2 
3 import p1.MyBinaryClass
4 
5 /**
6  * This class supports greeting people by name.
7  *
8  * @property name The name of the person to be greeted.
9  */
10 class Greeter(val name: String) {
11 
12     /**
13      * Prints the greeting to the standard output.
14      */
15     fun greet() {
16         println("Hello $name!")
17     }
18 }
19 
mainnull20 fun main(args: Array<String>) {
21     Greeter(args[0]).greet()
22 }
23 
24 val str = "Hello! ".repeat(4)
anull25 val x: (a: String, b: Int) -> Int = { a, b -> 0 }
26 
27 interface SomeInterface
28 private class SomeImpl : SomeInterface
29 
SomeInterfacenull30 fun SomeInterface.constructor(): SomeInterface {
31     return SomeImpl()
32 }
33 
34 open class SomeType
35 class SomeSubType : SomeType()
36 
SomeTypenull37 fun SomeType.constructor(): SomeType {
38     return SomeSubType()
39 }
40 
41 
42 annotation class A(val p: String)
43 
44 val MyBinaryClass.test get() = s()
45 
46