bnorm / kotlin-power-assert

Kotlin compiler plugin to enable diagrammed function calls in the Kotlin programming language
Apache License 2.0
581 stars 15 forks source link

FIR Compatibility #93

Closed bnorm closed 1 year ago

bnorm commented 1 year ago

List of FIR compatibility issues known so far:

Both of the issues above seem to be indications that this plugin needs to be converted to FIR to add proper support. The expression transformation probably needs to happen during FIR (if enabled) to maintain all the information needed for proper diagramming.

LewsTherinTelescope commented 1 year ago

The second issue might no longer apply, at least on JVM where I tried it. Simple test assertTrue(1 + 2 == 0) using language version 2.0 results in the desired error message:

java.lang.AssertionError: Assertion failed
assertTrue(1 + 2 == 0)
             |   |
             |   false
             3
...
bnorm commented 1 year ago

Seems like both issues have been resolved. Building the sample project completes now without errors using K2.