[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,55 @@
enum class B(val x: Int) {
B1(1),
B2(2);
companion object {
val SUM = B1.x + B2.x
val COPY = B1
}
}
enum class C(val x: Int) {
C1(SUM),
C2(1);
companion object {
val COPY = C2
val SUM = C1.x + COPY.x
}
}
// From KT-11769
enum class Fruit(personal: Int) {
APPLE(1);
companion object {
val common = 20
}
val score = personal + common
}
// Another example from KT-11769
enum class EnumCompanion1(val x: Int) {
INSTANCE(<!AMBIGUITY!>Companion<!>.<!UNRESOLVED_REFERENCE!>foo<!>()),
ANOTHER(foo());
companion object {
fun foo() = 42
}
}
// Also should be reported for implicit receiver
enum class EnumCompanion2(val x: Int) {
INSTANCE(foo());
companion object {
fun foo() = 42
}
}
// But not for another enum
enum class EnumCompanion3(val x: Int) {
INSTANCE(EnumCompanion1.foo()),
ANOTHER(EnumCompanion2.foo());
companion object
}