Any idea how this compiler error happens? Or what ...
# javascript
e
Any idea how this compiler error happens? Or what it means? This seems to happen on the JS side.
Copy code
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.ir.symbols.impl.IrBindableSymbolBase.bind(IrPrivateSymbolBase.kt:75)
IrVariableSymbolImpl is already bound. Signature: null. Owner: VAR name:_ctx type:<unbound IrClassPublicSymbolImpl> [val]: KtProperty:
a
So, it means that there are two or more variable declarations that use the same variable symbol
Is it happened after a plugin applying?
e
Thanks Artem! It is very strange tho. That
_ctx
is wrapped into its own scope, e.g.:
Copy code
if (true) {
  val _ctx = ...
  zzz = _ctx
}
Blocks are all like that (exactly like that). The file that's compiling is 100k lines (around 4 megabytes). Might be that the compiler breaks with that amount of code, or after a certain amount of nesting?
Is it happened after a plugin applying?
No no
Just verified it happens on the Native side too.
a
It's so weird. It's definitely should be reported, because I have no idea what is going wrong. It's a common situation in case of a custom compiler plugin (people just create an invalid IR, so backend can't work with it) but not for the project with a lot of code.
gratitude thank you 1
e
I have solved by using an outermost
var _ctx
, getting rid of
if (true) { ... }
This is the commit for the code generator template: https://github.com/Strumenta/antlr-kotlin/pull/152/commits/9d8c347cd9482d91637eeec9f302504a2a00638b And this is the PR I was working on https://github.com/Strumenta/antlr-kotlin/pull/152
It's definitely should be reported
Sounds good, I'll create a ticket anyway.
🙏 1
I've increased the IDE intellisense max file size to 10 megabytes, let's see if the IDE sees something wrong with the code as it was before
🫡 1
IntelliJ freezed, nice
😓 1
Unfreezed. The IDE doesn't see any errors, so it really looks like a compiler issue.