Add version requirements for declarations with !! types

^KT-26245 Related
This commit is contained in:
Denis.Zharkov
2021-04-08 14:44:44 +03:00
committed by TeamCityServer
parent 403406f92d
commit 37813d9d82
3 changed files with 101 additions and 3 deletions
@@ -138,6 +138,28 @@ abstract class AbstractVersionRequirementTest : TestCaseWithTmpdir() {
)
}
fun testDefinitelyNotNull() {
doTest(
VersionRequirement.Version(1, 6), DeprecationLevel.ERROR, null, ProtoBuf.VersionRequirement.VersionKind.LANGUAGE_VERSION, null,
customLanguageVersion = LanguageVersion.KOTLIN_1_6,
fqNamesWithRequirements = listOf(
"test.A.foo",
"test.A.w",
"test.B.<init>",
"test.bar1",
"test.bar2",
"test.nn",
"test.Outer.R1",
"test.Outer.R2",
"test.Alias",
),
fqNamesWithoutRequirement = listOf(
"test.Outer",
"test.Outer.W",
),
)
}
fun testLanguageVersionViaAnnotation() {
doTest(
VersionRequirement.Version(1, 1), DeprecationLevel.WARNING, "message",