Commit Graph

2 Commits

Author SHA1 Message Date
Dmitry Savvinov 74fa6fc12c [k2, dfa] Smartcasts are not allowed on FirJavaField from other module
Handle case with FirField properly. Previously the code was returning
STABLE_VALUE in that case.

Note that in fact the changed 'when' branch expects only FirJavaField,
as FirFieldImpl should be handled by FirBackingFieldSymbol-check at
the beginning of the method. However, it is impossible to refer to
FirJavaField directly due to module visibility

Enumerate all cases more carefully via exhaustive 'when',
it's more readable and will prevent potential issues in future in case
more subclasses are added.

^KT-58279 Fixed
2024-01-31 09:53:45 +00:00
Dmitry Savvinov 6661a66fc3 [Tests] Add tests on smartcasts on static Java fields
Current behavior for different modules is undesired, will be fixed in
the next commit

^KT-58279
2024-01-31 09:53:45 +00:00