Can anyone think of a reason why `./gradlew browse...
# javascript
Can anyone think of a reason why
./gradlew browserDevelopmentRun
would throw the following error in Chrome and Safari but otherwise work in Firefox?
Copy code
Uncaught TypeError: _this__u8e3s4.get_first_irdx8n_k$ is not a function
    at get_LHS (CFG.kt?0f81:15:32)
    at getParametersIn (CFG.kt?0f81:120:32)
    at eliminateParametricityFromLHS (CFG.kt?0f81:136:31)
    at normalize (Standard.kt?4256:138:43)
    at normalForm$delegate$lambda (CFG.kt?0f81:32:36)
    at eval (Graph.kt?c30b:185:29)
    at protoOf.getOrPut_x8bkas_k$ (Standard.kt?4256:13:31)
    at sam$kotlin_properties_ReadOnlyProperty$0.eval [as function_1] (Graph.kt?c30b:185:11)
    at protoOf.getValue_4lco8v_k$ (galoisenne.js:14950:17)
    at get_normalForm (CFG.kt?0f81:32:28)
Here is the relevant context for the Kotlin code in question:
Copy code
typealias Π2<A, B> = Pair<A, B>
typealias Σᐩ = String
typealias Production = Π2<Σᐩ, List<Σᐩ>>
typealias CFG = Set<Production>

val Production.LHS: Σᐩ get() = first
there’s a lot of special symbols there - perhaps they aren’t making the trip to JS very well.
🤔 1
I thought that too, but the error still occurs after renaming to ASCII. And only on Chrome / Safari...
interesting. does
exist and look like a function?
I was looking but didn't see it defined anywhere in the generated JS
All of the usages seem to be callers
hmmm. perhaps the name mangling is problematic - does the containing object exist (outside of callers into it)?
kotlin version??
It seems to just be a variable name for the extension receiver. I'm using
Also seems to appear quite frequently inside the JS-compiled Kotlin stdlib, but no declaration.
is it possible the JS files are included out-of-order in the browser?
Well there's only a single script file so I'm not sure how that could happen. FF loads and runs without an error, Safari fails
With kotlin/js, i reaised sometimes just running a clean build can work. Did you try that?? running a clean build?
Yes, I tried cleaning the project and restarting via
./gradlew clean kotlinUpgradeYarnLock browserDevelopmentRun --continuous
, same error
looks like Safari is loading the JS file from cache - perhaps try clearing out / disabling the browser cache.
Same issue with the cache cleared & disabled
Maybe I'll just submit a ticket
Thanks for your suggestions
👍 1
yea could be the beta Kotlin.