forked from JetBrains/kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't assert that annotation class has constructor in AnnotationDeser…
…ializer #KT-9758 Fixed
- Loading branch information
Showing
8 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...a/compileKotlinAgainstCustomBinaries/replaceAnnotationClassWithInterface/library-1/Ann.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package test | ||
|
||
import kotlin.annotation.AnnotationTarget.* | ||
|
||
@Target(CLASS, ANNOTATION_CLASS, TYPE_PARAMETER, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPE, EXPRESSION, FILE) | ||
annotation class Ann(val s: String) |
4 changes: 4 additions & 0 deletions
4
...a/compileKotlinAgainstCustomBinaries/replaceAnnotationClassWithInterface/library-2/Ann.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package test | ||
|
||
// Ha! Ann is no longer an annotation, it's an interface instead. But we shouldn't assert it anywhere in the compiler | ||
interface Ann |
3 changes: 3 additions & 0 deletions
3
...CustomBinaries/replaceAnnotationClassWithInterface/replaceAnnotationClassWithInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package test | ||
|
||
fun bar() = Test().foo("ok") |
11 changes: 11 additions & 0 deletions
11
...ustomBinaries/replaceAnnotationClassWithInterface/replaceAnnotationClassWithInterface.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package test | ||
|
||
public fun bar(): @test.Ann() kotlin.String | ||
|
||
public interface Ann { | ||
} | ||
|
||
@test.Ann() public final class Test { | ||
public constructor Test() | ||
@test.Ann() public final fun foo(/*0*/ @test.Ann() s: @test.Ann() kotlin.String): @test.Ann() kotlin.String | ||
} |
7 changes: 7 additions & 0 deletions
7
...ata/compileKotlinAgainstCustomBinaries/replaceAnnotationClassWithInterface/usage/usage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package test | ||
|
||
@Ann("class") | ||
class Test { | ||
@Ann("function") | ||
fun foo(@Ann("parameter") s: @Ann("parameter type") String): @Ann("return type") String = @Ann("expression") s | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters