naitbit
09/28/2017, 9:09 AMsortBy
on mutableList
More specifically:
children.sortBy{ it.toString() }
generates
var sortWith = Kotlin.kotlin.collections.sortWith_nqfjgj$;
var wrapFunction = Kotlin.wrapFunction;
var compareBy$lambda = wrapFunction(function () {
var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;
return function (closure$selector) {
return function (a, b) {
var selector = closure$selector;
return compareValues(selector(a), selector(b));
};
};
});
var Comparator = Kotlin.kotlin.Comparator;
function Comparator$ObjectLiteral(closure$comparison) {
this.closure$comparison = closure$comparison;
}
Comparator$ObjectLiteral.prototype.compare = function (a, b) {
return this.closure$comparison(a, b);
};
Comparator$ObjectLiteral.$metadata$ = {kind: Kotlin.Kind.CLASS, interfaces: [Comparator]};
and Firebase complains:
TypeError: wrapFunction is not a function
at /tmp/fbfn_20366LgmtP4EM7pSy/kot.js:96:26
at Object.<anonymous> (/tmp/fbfn_20366LgmtP4EM7pSy/kot.js:167:2)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
naitbit
09/28/2017, 9:12 AMkotlin_version = '1.1.50'
via gradle if it matterskonsoletyper
09/28/2017, 9:14 AMkotlin.js
library. Which version are you using?konsoletyper
09/28/2017, 9:14 AMnaitbit
09/28/2017, 9:14 AM"org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
konsoletyper
09/28/2017, 9:16 AM./gradlew dependencies
and see which version of kotlin-stdlib-js
artifact is usednaitbit
09/28/2017, 9:17 AMkonsoletyper
09/28/2017, 9:18 AMnaitbit
09/28/2017, 9:19 AMnaitbit
09/28/2017, 9:44 AMrequire('kotlin')
simply failed due to path issues and was null. At least on empty non Firebase project it seems to fail similarly if it is not imported.
I now need to figure out how to put kotlin.js
in correct pathnaitbit
09/28/2017, 9:45 AMnaitbit
09/28/2017, 10:56 AM