turansky
06/22/2022, 12:54 AMis and as expressions?
Is there DeclarationChecker analog for such checks?Youssef Shoaib [MOD]
06/22/2022, 6:11 AMExpressionCheckersturansky
06/22/2022, 7:15 PMdmitriy.novozhilov
06/23/2022, 11:48 AMis and as from compiler plugin then there are two options:
1. Create DeclarationChecker in your plugin for old frontend (it's the one with PSI and BindingContext) and manually traverse body with some visitor
2. Write frontend part of your plugin for FIR and create your own FirTypeOperatorCallChecker (it will be called only for is and as expression)
First option can be used in production plugin right now (because current frontend is stable)
Second option will require to completely rewrite fronted part of your plugin, but it provide more powerful and nice API, so it's great option for some research
And if you choose first option you will still require to rewrite your plugin to FIR when it becomes stable and default