diff --git a/src/main/java/translator/preprocessor/Preprocessor.kt b/src/main/java/translator/preprocessor/Preprocessor.kt index 81665b9f..793ed163 100644 --- a/src/main/java/translator/preprocessor/Preprocessor.kt +++ b/src/main/java/translator/preprocessor/Preprocessor.kt @@ -21,7 +21,8 @@ import tree.Type.TypeName */ data class PreprocessorState( val classNames: HashMap = hashMapOf( - "System" to "class__System" + "Object" to "class__Object", + "System" to "class__System" ), val stdClassesNeededForAlias: HashSet = hashSetOf( "class__Object", @@ -224,20 +225,13 @@ private fun preprocessCompoundName(state: PreprocessorState, compoundName: Compo compoundName.names .replaceAll { - state.classNames[it]?.let { - state.classNames[it] - } - ?: run { - it - } + state.classNames[it] ?: it } tryAddClassForAliases(state, compoundName.names.first()) } private fun tryAddClassForAliases(state: PreprocessorState, className: String) { - print("Trying add class [$className]...") if (state.stdClassesNeededForAlias.contains(className)) { state.stdClassesForCurrentAlias.add(className) - print("Class [$className] added.") } }