aboutsummaryrefslogtreecommitdiff
path: root/core/testdata/classes
diff options
context:
space:
mode:
Diffstat (limited to 'core/testdata/classes')
-rw-r--r--core/testdata/classes/annotatedClass.kt1
-rw-r--r--core/testdata/classes/annotatedClassWithAnnotationParameters.kt1
-rw-r--r--core/testdata/classes/classWithCompanionObject.kt7
-rw-r--r--core/testdata/classes/classWithConstructor.kt1
-rw-r--r--core/testdata/classes/classWithFunction.kt4
-rw-r--r--core/testdata/classes/classWithProperty.kt3
-rw-r--r--core/testdata/classes/companionObjectExtension.kt10
-rw-r--r--core/testdata/classes/dataClass.kt1
-rw-r--r--core/testdata/classes/emptyClass.kt3
-rw-r--r--core/testdata/classes/emptyObject.kt3
-rw-r--r--core/testdata/classes/genericClass.kt3
-rw-r--r--core/testdata/classes/indirectOverride.kt9
-rw-r--r--core/testdata/classes/innerClass.kt5
-rw-r--r--core/testdata/classes/javaAnnotationClass.kt5
-rw-r--r--core/testdata/classes/notOpenClass.kt7
-rw-r--r--core/testdata/classes/sealedClass.kt1
-rw-r--r--core/testdata/classes/secondaryConstructor.kt5
17 files changed, 69 insertions, 0 deletions
diff --git a/core/testdata/classes/annotatedClass.kt b/core/testdata/classes/annotatedClass.kt
new file mode 100644
index 00000000..1b58f56c
--- /dev/null
+++ b/core/testdata/classes/annotatedClass.kt
@@ -0,0 +1 @@
+@Strictfp class Foo() {}
diff --git a/core/testdata/classes/annotatedClassWithAnnotationParameters.kt b/core/testdata/classes/annotatedClassWithAnnotationParameters.kt
new file mode 100644
index 00000000..930d6a62
--- /dev/null
+++ b/core/testdata/classes/annotatedClassWithAnnotationParameters.kt
@@ -0,0 +1 @@
+@Deprecated("should no longer be used") class Foo() {}
diff --git a/core/testdata/classes/classWithCompanionObject.kt b/core/testdata/classes/classWithCompanionObject.kt
new file mode 100644
index 00000000..fdbd915d
--- /dev/null
+++ b/core/testdata/classes/classWithCompanionObject.kt
@@ -0,0 +1,7 @@
+class Klass() {
+ companion object {
+ val x = 1
+
+ fun foo() {}
+ }
+}
diff --git a/core/testdata/classes/classWithConstructor.kt b/core/testdata/classes/classWithConstructor.kt
new file mode 100644
index 00000000..0751d570
--- /dev/null
+++ b/core/testdata/classes/classWithConstructor.kt
@@ -0,0 +1 @@
+class Klass(name: String) \ No newline at end of file
diff --git a/core/testdata/classes/classWithFunction.kt b/core/testdata/classes/classWithFunction.kt
new file mode 100644
index 00000000..a981cfb6
--- /dev/null
+++ b/core/testdata/classes/classWithFunction.kt
@@ -0,0 +1,4 @@
+class Klass {
+ fun fn() {
+ }
+}
diff --git a/core/testdata/classes/classWithProperty.kt b/core/testdata/classes/classWithProperty.kt
new file mode 100644
index 00000000..2a849572
--- /dev/null
+++ b/core/testdata/classes/classWithProperty.kt
@@ -0,0 +1,3 @@
+class Klass {
+ val name: String = ""
+} \ No newline at end of file
diff --git a/core/testdata/classes/companionObjectExtension.kt b/core/testdata/classes/companionObjectExtension.kt
new file mode 100644
index 00000000..4b471376
--- /dev/null
+++ b/core/testdata/classes/companionObjectExtension.kt
@@ -0,0 +1,10 @@
+class Foo {
+ companion object Default {
+ }
+}
+
+
+/**
+ * The def
+ */
+val Foo.Default.x: Int get() = 1
diff --git a/core/testdata/classes/dataClass.kt b/core/testdata/classes/dataClass.kt
new file mode 100644
index 00000000..62c6f0ec
--- /dev/null
+++ b/core/testdata/classes/dataClass.kt
@@ -0,0 +1 @@
+data class Foo() {}
diff --git a/core/testdata/classes/emptyClass.kt b/core/testdata/classes/emptyClass.kt
new file mode 100644
index 00000000..abd20cc8
--- /dev/null
+++ b/core/testdata/classes/emptyClass.kt
@@ -0,0 +1,3 @@
+class Klass {
+
+} \ No newline at end of file
diff --git a/core/testdata/classes/emptyObject.kt b/core/testdata/classes/emptyObject.kt
new file mode 100644
index 00000000..4138bf31
--- /dev/null
+++ b/core/testdata/classes/emptyObject.kt
@@ -0,0 +1,3 @@
+object Obj {
+
+} \ No newline at end of file
diff --git a/core/testdata/classes/genericClass.kt b/core/testdata/classes/genericClass.kt
new file mode 100644
index 00000000..db20ff7e
--- /dev/null
+++ b/core/testdata/classes/genericClass.kt
@@ -0,0 +1,3 @@
+class Klass<T> {
+
+} \ No newline at end of file
diff --git a/core/testdata/classes/indirectOverride.kt b/core/testdata/classes/indirectOverride.kt
new file mode 100644
index 00000000..8d091b80
--- /dev/null
+++ b/core/testdata/classes/indirectOverride.kt
@@ -0,0 +1,9 @@
+abstract class C() {
+ abstract fun foo()
+}
+
+abstract class D(): C()
+
+class E(): D() {
+ override fun foo() {}
+}
diff --git a/core/testdata/classes/innerClass.kt b/core/testdata/classes/innerClass.kt
new file mode 100644
index 00000000..3c6e497d
--- /dev/null
+++ b/core/testdata/classes/innerClass.kt
@@ -0,0 +1,5 @@
+class C {
+ inner class D {
+
+ }
+} \ No newline at end of file
diff --git a/core/testdata/classes/javaAnnotationClass.kt b/core/testdata/classes/javaAnnotationClass.kt
new file mode 100644
index 00000000..95600147
--- /dev/null
+++ b/core/testdata/classes/javaAnnotationClass.kt
@@ -0,0 +1,5 @@
+import java.lang.annotation.Retention
+import java.lang.annotation.RetentionPolicy
+
+@Retention(RetentionPolicy.SOURCE)
+public annotation class throws()
diff --git a/core/testdata/classes/notOpenClass.kt b/core/testdata/classes/notOpenClass.kt
new file mode 100644
index 00000000..edee2c1a
--- /dev/null
+++ b/core/testdata/classes/notOpenClass.kt
@@ -0,0 +1,7 @@
+open class C() {
+ open fun f() {}
+}
+
+class D() : C() {
+ override fun f() {}
+}
diff --git a/core/testdata/classes/sealedClass.kt b/core/testdata/classes/sealedClass.kt
new file mode 100644
index 00000000..93350393
--- /dev/null
+++ b/core/testdata/classes/sealedClass.kt
@@ -0,0 +1 @@
+sealed class Foo() {}
diff --git a/core/testdata/classes/secondaryConstructor.kt b/core/testdata/classes/secondaryConstructor.kt
new file mode 100644
index 00000000..e5cb2557
--- /dev/null
+++ b/core/testdata/classes/secondaryConstructor.kt
@@ -0,0 +1,5 @@
+class C() {
+ /** This is a secondary constructor. */
+ constructor(s: String): this() {
+ }
+}