Commit Graph

8 Commits

Author SHA1 Message Date
Mikhail Glukhikh fdf4f477a6 FIR2IR: fix problems with enum entry / anonymous object visibility 2020-02-18 10:50:03 +03:00
Roman Artemev e57d34dd9e Make fix test:
- [JS IR] Unmute fixed tests
 - [IrText] Update testdata
 - [WASM] Temporary turn wasm test off
 - [FirText] Temporary turn fit text tests off
 - [JVM IR] Turn off klib jvm test
 - [IR] Add new test
2020-02-14 18:22:17 +03:00
pyos 35c2573b33 PSI2IR: generate IrEnumConstructorCalls with correct return type
Normally, the fact that is was Unit was not visible as enum constructors
are lowered to normal class constructors anyway. The exception is when
the arguments are reordered, causing the incorrect return type to leak
into the block that holds temporary variables.
2019-12-03 11:54:41 +03:00
Dmitry Petrov ee9a174c1f KT-7897 Do not require to call enum constructor for each entry if all parameters have default values
Do not report an error on enum entry without initializer if all parameters have default values
(error is still reported if there is no such constructor, or if the constructor call is ambiguous).

Record resolved call on KtEnumEntry.

NB is the enum entry has a corresponding subclass, we still have to generate the "default" constructor call,
because FE doesn't know about the platform-specific representation of that class and its constructors.

See also KT-14097, KT-15900
2017-01-24 16:59:47 +03:00
Dmitry Petrov 539d7ccf6f Support configuration directives FULL_JDK, WITH_RUNTIME, WITH_REFLECT in Psi2Ir tests. 2016-10-18 09:08:59 +03:00
Dmitry Petrov c3c758c7cc Do not generate underlying classes for enum entries without member declarations. 2016-10-18 09:08:47 +03:00
Dmitry Petrov 9eeb492fe3 Underlying classes for enum entries. 2016-10-18 09:08:44 +03:00
Dmitry Petrov bd76e39a8c Enum entries generation (no underlying classes yet) 2016-10-18 09:08:44 +03:00