Add annotations to primary constructor together with 'constructor'

This fixes incorrect behaviour if primary constructor has no explicit
'constructor' keywork
#KT-25548 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-08-20 17:22:42 +03:00
parent c12f29ae30
commit 564ea629d1
5 changed files with 40 additions and 4 deletions
@@ -0,0 +1,12 @@
// "Add '@PropertyTypeMarker' annotation to 'PropertyTypeContainer'" "true"
// COMPILER_ARGUMENTS: -Xuse-experimental=kotlin.Experimental
// WITH_RUNTIME
// ACTION: Add '@PropertyTypeMarker' annotation to containing class 'PropertyTypeContainer'
@Experimental
annotation class PropertyTypeMarker
@PropertyTypeMarker
class PropertyTypeMarked
class PropertyTypeContainer(val subject: Property<caret>TypeMarked)
@@ -0,0 +1,12 @@
// "Add '@PropertyTypeMarker' annotation to 'PropertyTypeContainer'" "true"
// COMPILER_ARGUMENTS: -Xuse-experimental=kotlin.Experimental
// WITH_RUNTIME
// ACTION: Add '@PropertyTypeMarker' annotation to containing class 'PropertyTypeContainer'
@Experimental
annotation class PropertyTypeMarker
@PropertyTypeMarker
class PropertyTypeMarked
class PropertyTypeContainer @PropertyTypeMarker constructor(val subject: PropertyTypeMarked)