Effects: Add declarations for description of contracts

Add ContractDescription structure which is used for declarative representation
of function's contract.

Also, add corresponding LanguageFeatures.

==========
This is the first commit from a series of 18 commits which gradually
introduce effect system into the compiler. All such commits will be
marked with appropriate comment and index in that series.

While each one of such commits separately shouldn't break compiler (i.e
you can checkout any of them and expect compiler to build and pass
tests successfully, e.g. for bissecting purposes), semantically they
all are one big feature and not entirely independent. Please bear that
in mind while working with/changing only some of them -- some strange
effects can happen.
This commit is contained in:
Dmitry Savvinov
2017-10-03 15:02:23 +03:00
parent ee72cc268c
commit ba84bd3f19
8 changed files with 349 additions and 0 deletions
@@ -65,6 +65,8 @@ enum class LanguageFeature(
JvmPackageName(KOTLIN_1_2),
AssigningArraysToVarargsInNamedFormInAnnotations(KOTLIN_1_2),
ReturnsEffect(KOTLIN_1_3),
CallsInPlaceEffect(KOTLIN_1_3),
RestrictionOfValReassignmentViaBackingField(KOTLIN_1_3),
NestedClassesInEnumEntryShouldBeInner(KOTLIN_1_3),
ProhibitDataClassesOverridingCopy(KOTLIN_1_3),