From bac315d15c7de87cacf152d31f08c4f703abee34 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 17 Nov 2016 12:44:08 +0300 Subject: Test for previous fix, in/out modifiers not lost --- core/src/test/kotlin/model/TypeAliasTest.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'core/src') diff --git a/core/src/test/kotlin/model/TypeAliasTest.kt b/core/src/test/kotlin/model/TypeAliasTest.kt index e67572f1..812fd9dc 100644 --- a/core/src/test/kotlin/model/TypeAliasTest.kt +++ b/core/src/test/kotlin/model/TypeAliasTest.kt @@ -102,4 +102,22 @@ class TypeAliasTest { } } } + + @Test + fun testAsTypeBoundWithVariance() { + verifyModel("testdata/typealias/asTypeBoundWithVariance.kt") { + val pkg = it.members.single() + with(pkg.members(NodeKind.Class).find { it.name == "C" }!!) { + val tParam = detail(NodeKind.TypeParameter) + assertEquals("out", tParam.detail(NodeKind.Modifier).name) + assertEquals("B", tParam.detail(NodeKind.Type).link(NodeKind.TypeAlias).name) + } + + with(pkg.members(NodeKind.Class).find { it.name == "D" }!!) { + val tParam = detail(NodeKind.TypeParameter) + assertEquals("in", tParam.detail(NodeKind.Modifier).name) + assertEquals("B", tParam.detail(NodeKind.Type).link(NodeKind.TypeAlias).name) + } + } + } } \ No newline at end of file -- cgit