You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it's not possible to retrieve the default value as it is expensive to compute (#642).
This feature request is not about extracting all the default values, but just the compile time constants, that would cover the same values as annotations. It would help a lot for static analysis, for schema generation by example.
Example:
data classMyClass(
valstaticString:String = "static string", // would extract 'static string'valstaticInt:Int = 42, // would extract '42'valfieldDependentDefault:String = staticString, // would extract 'static string' as it is the static default of staticString fieldvaldynamicDefault:String = UUID.random().toString(), // would extract nothing (or a DYNAMIC placeholder) as it is not constant
)
EDIT: fixed a typo on dynamicDefault example
The text was updated successfully, but these errors were encountered:
Currently, it's not possible to retrieve the default value as it is expensive to compute (#642).
This feature request is not about extracting all the default values, but just the compile time constants, that would cover the same values as annotations. It would help a lot for static analysis, for schema generation by example.
Example:
EDIT: fixed a typo on
dynamicDefault
exampleThe text was updated successfully, but these errors were encountered: