Report CONTRACT_NOT_ALLOWED diagnostic on extension property getter/setter

KT-27090
This commit is contained in:
Dmitriy Novozhilov
2019-02-22 13:48:33 +03:00
parent b484e03fa8
commit 84da8b6279
3 changed files with 9 additions and 13 deletions
@@ -58,11 +58,11 @@ val topLevelAnonymousFunction = fun (x: Boolean) {
var topLevelPropertyAccessors: Int? = 42
get() {
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (field != null) }
<!CONTRACT_NOT_ALLOWED, CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (field != null) }
return 42
}
set(value) {
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (field != null) }
<!CONTRACT_NOT_ALLOWED, CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (field != null) }
}