Kapt: Add DUMP_DEFAULT_PARAMETER_VALUES flag (KT-29355)

Put initializers on fields when corresponding primary constructor
  parameters have a default value specified. The new behavior
  is available under the new 'DUMP_DEFAULT_PARAMETER_VALUES' flag.

Note that this doesn't affect regular functions with default parameter
  values, as well as primary constructor parameters without a
  'val' or 'var' keyword.
This commit is contained in:
Yan Zhulanow
2020-05-01 17:54:03 +09:00
parent 60aa47553d
commit 2044ece335
22 changed files with 525 additions and 51 deletions
@@ -0,0 +1,8 @@
// DUMP_DEFAULT_PARAMETER_VALUES
package test
@Anno
class User(val name: String = "John", age: Int = 18)
internal annotation class Anno