Skip to content

Commit 0e23ffc

Browse files
dimonchik0036Space Team
authored andcommitted
[LC] add test on Throws annotation
1 parent 5a74fec commit 0e23ffc

File tree

10 files changed

+137
-0
lines changed

10 files changed

+137
-0
lines changed

analysis/symbol-light-classes/tests/org/jetbrains/kotlin/light/classes/symbol/decompiled/SymbolLightClassesByFqNameForLibraryTestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/symbol-light-classes/tests/org/jetbrains/kotlin/light/classes/symbol/decompiled/SymbolLightClassesParentingForLibraryTestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/symbol-light-classes/tests/org/jetbrains/kotlin/light/classes/symbol/source/SymbolLightClassesByFqNameForSourceTestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analysis/symbol-light-classes/tests/org/jetbrains/kotlin/light/classes/symbol/source/SymbolLightClassesParentingForSourceTestGenerated.java

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
public final class Test /* Test*/ extends Base {
2+
@org.jetbrains.annotations.NotNull()
3+
private final java.lang.String boo;
4+
5+
@org.jetbrains.annotations.NotNull()
6+
private final java.lang.String foo;
7+
8+
private final int p1;
9+
10+
@org.jetbrains.annotations.NotNull()
11+
public final java.lang.String getBoo() throws MyException;// getBoo()
12+
13+
@org.jetbrains.annotations.NotNull()
14+
public final java.lang.String getFoo() throws MyException;// getFoo()
15+
16+
public Test(int) throws MyException;// .ctor(int)
17+
18+
public final void readSomething() throws MyException;// readSomething()
19+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
public final class Test /* Test*/ extends Base {
2+
@org.jetbrains.annotations.NotNull()
3+
private final java.lang.String boo = "42" /* initializer type: java.lang.String */;
4+
5+
@org.jetbrains.annotations.NotNull()
6+
private final java.lang.String foo = "42" /* initializer type: java.lang.String */;
7+
8+
private final int p1;
9+
10+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
11+
@org.jetbrains.annotations.NotNull()
12+
public final java.lang.String getBoo() throws MyException;// getBoo()
13+
14+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
15+
@org.jetbrains.annotations.NotNull()
16+
public final java.lang.String getFoo() throws MyException;// getFoo()
17+
18+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
19+
public Test(int) throws MyException;// .ctor(int)
20+
21+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
22+
public final void readSomething() throws MyException;// readSomething()
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
public final class Test /* Test*/ extends Base {
2+
@org.jetbrains.annotations.NotNull()
3+
private final java.lang.String boo;
4+
5+
@org.jetbrains.annotations.NotNull()
6+
private final java.lang.String foo;
7+
8+
private final int p1;
9+
10+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
11+
@org.jetbrains.annotations.NotNull()
12+
public final java.lang.String getBoo() throws MyException;// getBoo()
13+
14+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
15+
@org.jetbrains.annotations.NotNull()
16+
public final java.lang.String getFoo() throws MyException;// getFoo()
17+
18+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
19+
public Test(int) throws MyException;// .ctor(int)
20+
21+
@kotlin.jvm.Throws(exceptionClasses = {MyException.class})
22+
public final void readSomething() throws MyException;// readSomething()
23+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Test
2+
// WITH_STDLIB
3+
4+
abstract class Base
5+
6+
class MyException : Exception()
7+
8+
class Test
9+
@Throws(MyException::class)
10+
constructor(
11+
private val p1: Int
12+
) : Base() {
13+
@Throws(MyException::class)
14+
fun readSomething() {
15+
throw MyException()
16+
}
17+
18+
@get:Throws(MyException::class)
19+
val foo : String = "42"
20+
21+
val boo : String = "42"
22+
@Throws(MyException::class)
23+
get
24+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
public final class Test /* Test*/ extends Base {
2+
@org.jetbrains.annotations.NotNull()
3+
private final java.lang.String boo;
4+
5+
@org.jetbrains.annotations.NotNull()
6+
private final java.lang.String foo;
7+
8+
private final int p1;
9+
10+
@org.jetbrains.annotations.NotNull()
11+
public final java.lang.String getBoo() throws MyException;// getBoo()
12+
13+
@org.jetbrains.annotations.NotNull()
14+
public final java.lang.String getFoo() throws MyException;// getFoo()
15+
16+
public Test(int) throws MyException;// .ctor(int)
17+
18+
public final void readSomething() throws MyException;// readSomething()
19+
}

compiler/tests-gen/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)