Run "Add 'init' keyword in whole project" quickfix

This commit is contained in:
Denis Zharkov
2015-03-31 12:22:34 +03:00
parent 99f1ab333e
commit a4018d9eae
65 changed files with 85 additions and 82 deletions
@@ -55,7 +55,7 @@ public open class JsFunctionScope(parent: JsScope, description: String) : JsScop
private inner class LabelScope(parent: LabelScope?, val ident: String) : JsScope(parent, "Label scope for $ident", null) {
val labelName: JsName
{
init {
val freshIdent = when {
ident in RESERVED_WORDS -> getFreshIdent(ident)
parent != null -> parent.getFreshIdent(ident)
@@ -70,9 +70,9 @@ public class FunctionReader(private val context: TranslationContext) {
* Maps moduleName to kotlin object variable.
* The default variable is Kotlin, but it can be renamed by minifier.
*/
private val moduleKotlinVariable = hashMapOf<String, String>();
private val moduleKotlinVariable = hashMapOf<String, String>()
{
init {
val config = context.getConfig() as LibrarySourcesConfig
val libs = config.getLibraries().map { File(it) }
val files = LibraryUtils.readJsFiles(libs.map { it.getPath() }.toList())
@@ -50,9 +50,9 @@ public class DelegationTranslator(
classDeclaration.getDelegationSpecifiers().filterIsInstance<JetDelegatorByExpressionSpecifier>();
private class Field (val name: String, val generateField: Boolean)
private val fields = HashMap<JetDelegatorByExpressionSpecifier, Field>();
private val fields = HashMap<JetDelegatorByExpressionSpecifier, Field>()
{
init {
for (specifier in delegationBySpecifiers) {
val expression = specifier.getDelegateExpression() ?:
throw IllegalArgumentException("delegate expression should not be null: ${specifier.getText()}")
@@ -70,7 +70,7 @@ public object NumberAndCharConversionFIF : CompositeFIF() {
}
}
{
init {
add(USE_AS_IS!!, ConversionUnaryIntrinsic(ID))
for((stringPattern, intrinsic) in convertOperations) {
add(pattern(stringPattern), intrinsic)