Smallville7123
03/25/2019, 8:17 PMclass balanced {
init {
println("init")
}
inner class balanceList {
var l : MutableList<Char> = mutableListOf()
var r : MutableList<Char> = mutableListOf()
fun addPair( l : Char, r : Char) {
this.l.add(l)
this.r.add(r)
}
init {
println("init")
}
}
fun test() {
var balance = balanced() // Caused by: java.lang.NoSuchMethodError: method <init>()V not found
// balance.addPair('L', 'R')
// println(balance.r[0])
}
}
Executing tasks: [:app:assembleDebug]
> Configure project :app
starting KOTLIN_PRE_PROCESSOR
using preprocessing examples.kt in KPP/src
registered macro definition for preprocessing examples.kt at index 1
processing preprocessing examples.kt -> preprocessing examples.kt.preprocessed.kt
preprocessing examples.kt: preprocessor directive: define
preprocessing examples.kt: preprocessor line: #define f([](int a, int b, int c) { return a + b + c; }, [](int a, int b, int c) { return a + b + c; }) Kkkq // this macro accepts two arguments
init
text : ([](int a, int b, int c) { return a + b + c; }, [](int a, int b, int c) { return a + b + c; })
extracting arguments for [](int a, int b, int c) { return a + b + c; }, [](int a, int b, int c) { return a + b + c; }
init
FAILURE: Build failed with an exception.
* Where:
Build file '/home/superlock/AndroidStudioProjects/AudioEvolved/app/build.gradle' line: 39
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not create task ':app:KOTLIN_PRE_PROCESSOR'.
> Build_gradle$balanced: method <init>()V not found
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 8s