Write KotlinSyntheticClass annotation on when-by-enum mapping classes

This commit is contained in:
Alexander Udalov
2015-02-16 15:34:09 +03:00
parent 6ce8d6bd2e
commit e705ff2517
4 changed files with 15 additions and 0 deletions
@@ -143,6 +143,15 @@ public class KotlinSyntheticClassAnnotationTest extends CodegenTestCase {
);
}
public void testWhenMappings() {
doTestKotlinSyntheticClass(
"enum class E { A }\n" +
"val x = when (E.A) { E.A -> 1; else -> 0; }",
"WhenMappings",
WHEN_ON_ENUM_MAPPINGS
);
}
private void doTestKotlinSyntheticClass(
@NotNull String code,
@NotNull String classFilePart,