Code cleanup: removed redundant semicolons

This commit is contained in:
Valentin Kipyatkov
2016-04-26 23:30:42 +03:00
parent e1d8c72aa7
commit b551886889
141 changed files with 2520 additions and 239 deletions
@@ -39,7 +39,7 @@ object CodegenUtilKt {
toInterface: ClassDescriptor,
delegateExpressionType: KotlinType? = null
): Map<CallableMemberDescriptor, CallableDescriptor> {
if (delegateExpressionType?.isDynamic() ?: false) return mapOf();
if (delegateExpressionType?.isDynamic() ?: false) return mapOf()
return descriptor.defaultType.memberScope.getContributedDescriptors().asSequence()
.filterIsInstance<CallableMemberDescriptor>()
@@ -43,13 +43,13 @@ open class BranchedValue(
v.visitLabel(branchJumpLabel)
v.iconst(0)
v.visitLabel(endLabel)
coerceTo(type, v);
coerceTo(type, v)
}
open fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
if (arg1 is CondJump) arg1.condJump(jumpLabel, v, jumpIfFalse) else arg1.put(operandType, v)
arg2?.put(operandType, v)
v.visitJumpInsn(patchOpcode(if (jumpIfFalse) opcode else negatedOperations[opcode]!!, v), jumpLabel);
v.visitJumpInsn(patchOpcode(if (jumpIfFalse) opcode else negatedOperations[opcode]!!, v), jumpLabel)
}
open fun loopJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen;
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.org.objectweb.asm.Type
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen;
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.load.java.JvmAbi
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind
@@ -42,7 +42,7 @@ class DefaultCallArgs(val size: Int) {
for (i in 0..size - 1) {
if (i != 0 && i % Integer.SIZE == 0) {
masks.add(mask)
mask = 0;
mask = 0
}
mask = mask or if (bits.get(i)) 1 shl (i % Integer.SIZE) else 0
}
@@ -61,6 +61,6 @@ class DefaultCallArgs(val size: Int) {
val parameterType = if (isConstructor) AsmTypes.DEFAULT_CONSTRUCTOR_MARKER else AsmTypes.OBJECT_TYPE
callGenerator.putValueIfNeeded(parameterType, StackValue.constant(null, parameterType))
}
return toInts.isNotEmpty();
return toInts.isNotEmpty()
}
}
@@ -156,7 +156,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
val delegateOwner = delegateFunctionDescriptor.containingDeclaration
if (delegateOwner is ClassDescriptor && delegateOwner.isCompanionObject) {
val singletonValue = StackValue.singleton(delegateOwner, typeMapper)
singletonValue.put(singletonValue.type, v);
singletonValue.put(singletonValue.type, v)
}
}
@@ -149,7 +149,7 @@ class InterfaceImplBodyCodegen(
override fun generateKotlinMetadataAnnotation() {
(v as InterfaceImplClassBuilder).stopCounting()
writeSyntheticClassMetadata(v);
writeSyntheticClassMetadata(v)
}
override fun done() {
@@ -29,7 +29,7 @@ class AsmTypeRemapper(val typeRemapper: TypeRemapper, val isDefaultGeneration: B
override fun createRemappingSignatureAdapter(v: SignatureVisitor?): SignatureVisitor {
if (isDefaultGeneration) {
return super.createRemappingSignatureAdapter(v);
return super.createRemappingSignatureAdapter(v)
}
return object : RemappingSignatureAdapter(v, this) {
@@ -71,7 +71,7 @@ abstract class CoveringTryCatchNodeProcessor(parameterSize: Int) {
}
Collections.sort<TryCatchBlockNodeInfo>(intervals, comp)
return intervals;
return intervals
}
protected fun substituteTryBlockNodes(node: MethodNode) {
@@ -84,7 +84,7 @@ class ReifiedTypeInliner(private val parametersMapping: TypeParameterMappings?)
Opcodes.INVOKESTATIC,
IntrinsicMethods.INTRINSICS_CLASS_NAME, NEED_CLASS_REIFICATION_MARKER_METHOD_NAME,
Type.getMethodDescriptor(Type.VOID_TYPE), false
);
)
}
}
@@ -113,7 +113,7 @@ open class NestedSourceMapper(
value, key ->
if (key.dest in value) 0 else RangeMapping.Comparator.compare(value, key)
})
return if (index < 0) null else ranges[index];
return if (index < 0) null else ranges[index]
}
}
@@ -188,7 +188,7 @@ open class DefaultSourceMapper(val sourceInfo: SourceInfo) : SourceMapper {
protected val origin: RawFileMapping
var callSiteMarker: CallSiteMarker? = null;
var callSiteMarker: CallSiteMarker? = null
set(value) {
lastMappedWithChanges = null
field = value
@@ -105,6 +105,6 @@ class AnonymousObjectTransformationInfo internal constructor(
}
override fun createTransformer(inliningContext: InliningContext, sameModule: Boolean): ObjectTransformer<*> {
return AnonymousObjectTransformer(this, inliningContext, sameModule);
return AnonymousObjectTransformer(this, inliningContext, sameModule)
}
}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.intrinsics;
package org.jetbrains.kotlin.codegen.intrinsics
import org.jetbrains.kotlin.codegen.AsmUtil.correctElementType
import org.jetbrains.kotlin.codegen.Callable
@@ -37,8 +37,8 @@ class BinaryOp(private val opcode: Int) : IntrinsicMethod() {
return createBinaryIntrinsicCallable(returnType, paramType, operandType) {
v ->
v.visitInsn(returnType.getOpcode(opcode));
if (operandType != returnType)
v.visitInsn(returnType.getOpcode(opcode))
if (operandType != returnType)
StackValue.coerce(operandType, returnType, v)
}
}
@@ -169,7 +169,7 @@ object TypeIntrinsics {
private val OBJECT_TYPE = Type.getObjectType("java/lang/Object")
private fun getAsMutableCollectionDescriptor(asmType: Type): String =
Type.getMethodDescriptor(asmType, OBJECT_TYPE);
Type.getMethodDescriptor(asmType, OBJECT_TYPE)
private val BEFORE_CHECKCAST_TO_FUNCTION_OF_ARITY = "beforeCheckcastToFunctionOfArity"
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.optimization.boxing;
package org.jetbrains.kotlin.codegen.optimization.boxing
import com.google.common.collect.ImmutableSet
import org.jetbrains.kotlin.codegen.AsmUtil
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.optimization.boxing;
package org.jetbrains.kotlin.codegen.optimization.boxing
import com.google.common.collect.ImmutableSet
import org.jetbrains.org.objectweb.asm.Opcodes
@@ -56,7 +56,7 @@ open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
PathUtil.getKotlinPathsForCompiler()
messageSeverityCollector.report(CompilerMessageSeverity.LOGGING, "Using Kotlin home directory " + paths.homePath, CompilerMessageLocation.NO_LOCATION)
PerformanceCounter.setTimeCounterEnabled(arguments.reportPerf);
PerformanceCounter.setTimeCounterEnabled(arguments.reportPerf)
val configuration = CompilerConfiguration()
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageSeverityCollector)
@@ -280,9 +280,9 @@ open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
configuration.put(JVMConfigurationKeys.DISABLE_INLINE, arguments.noInline)
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize)
configuration.put(JVMConfigurationKeys.DECLARATIONS_JSON_PATH, arguments.declarationsOutputPath)
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts);
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage);
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf);
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts)
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
}
private fun getClasspath(paths: KotlinPaths, arguments: K2JVMCompilerArguments): List<File> {
@@ -29,7 +29,7 @@ class JvmPackagePartProvider(val env: KotlinCoreEnvironment) : PackagePartProvid
env.configuration.getList(CommonConfigurationKeys.CONTENT_ROOTS).
filterIsInstance<JvmClasspathRoot>().
mapNotNull {
env.contentRootToVirtualFile(it);
env.contentRootToVirtualFile(it)
}.filter { it.findChild("META-INF") != null }.toMutableList()
}
@@ -128,7 +128,7 @@ object KotlinToJVMBytecodeCompiler {
result.throwIfError()
val generationStates = ArrayList<GenerationState>();
val generationStates = ArrayList<GenerationState>()
for (module in chunk) {
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
@@ -144,7 +144,7 @@ object KotlinToJVMBytecodeCompiler {
module.getModuleName(), onIndependentPartCompilationEnd)
outputFiles.put(module, generationState.factory)
generationStates.add(generationState);
generationStates.add(generationState)
}
try {
@@ -156,7 +156,7 @@ object KotlinToJVMBytecodeCompiler {
}
finally {
for (generationState in generationStates) {
generationState.destroy();
generationState.destroy()
}
}
}
@@ -435,7 +435,7 @@ object KotlinToJVMBytecodeCompiler {
AnalyzerWithCompilerReport.reportBytecodeVersionErrors(
generationState.extraJvmDiagnosticsTrace.bindingContext, environment.messageCollector()
);
)
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
return generationState
@@ -29,7 +29,7 @@ class ConsoleReplCommandReader : ReplCommandReader {
}
override fun readLine(next: ReplFromTerminal.WhatNextAfterOneLine): String? {
val prompt = if (next == ReplFromTerminal.WhatNextAfterOneLine.INCOMPLETE) "... " else ">>> ";
val prompt = if (next == ReplFromTerminal.WhatNextAfterOneLine.INCOMPLETE) "... " else ">>> "
return consoleReader.readLine(prompt)
}
@@ -275,7 +275,7 @@ class CompileServiceImpl(
}
val stub = UnicastRemoteObject.exportObject(this, port, LoopbackNetworkInterface.clientLoopbackSocketFactory, LoopbackNetworkInterface.serverLoopbackSocketFactory) as CompileService
registry.rebind (COMPILER_SERVICE_RMI_NAME, stub);
registry.rebind (COMPILER_SERVICE_RMI_NAME, stub)
timer.schedule(0) {
initiateElections()
@@ -71,11 +71,11 @@ fun isContainedByCompiledPartOfOurModule(descriptor: DeclarationDescriptor, outD
val file = binaryClass.file
if (file.fileSystem.protocol == StandardFileSystems.FILE_PROTOCOL) {
val ioFile = VfsUtilCore.virtualToIoFile(file)
return ioFile.absolutePath.startsWith(outDirectory.absolutePath + File.separator);
return ioFile.absolutePath.startsWith(outDirectory.absolutePath + File.separator)
}
}
return false;
return false
}
fun getSourceElement(descriptor: DeclarationDescriptor): SourceElement =
@@ -42,7 +42,7 @@ class ProtectedInSuperClassCompanionCallChecker : CallChecker {
if (!parentClassDescriptors.any { DescriptorUtils.isSubclass(it, companionOwnerDescriptor) }) return
// Called not within the same companion object or its owner class
if (companionDescriptor !in parentClassDescriptors && companionOwnerDescriptor !in parentClassDescriptors) {
context.trace.report(ErrorsJvm.SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC.on(resolvedCall.call.callElement));
context.trace.report(ErrorsJvm.SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC.on(resolvedCall.call.callElement))
}
}
}
@@ -49,7 +49,7 @@ object RepeatableAnnotationChecker: AdditionalAnnotationChecker {
if (duplicateAnnotation
&& classDescriptor.isRepeatableAnnotation()
&& classDescriptor.getAnnotationRetention() != KotlinRetention.SOURCE) {
trace.report(ErrorsJvm.NON_SOURCE_REPEATED_ANNOTATION.on(entry));
trace.report(ErrorsJvm.NON_SOURCE_REPEATED_ANNOTATION.on(entry))
}
existingTargetsForAnnotation.add(useSiteTarget)
@@ -131,7 +131,7 @@ class JavaSyntheticPropertiesScope(storageManager: StorageManager, private val l
val propertyType = getMethod.returnType!!
val descriptor = MyPropertyDescriptor.create(ownerClass, getMethod.original, setMethod?.original, name, propertyType)
return result(descriptor, possibleGetMethodNames, setMethodName);
return result(descriptor, possibleGetMethodNames, setMethodName)
}
private fun isGoodGetMethod(descriptor: FunctionDescriptor): Boolean {
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.cfg
import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.psi.*
import com.intellij.psi.PsiElement
import com.intellij.psi.tree.TokenSet
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
@@ -63,9 +63,9 @@ class KDocLinkParser(): PsiParser {
}
else {
if (!builder.eof()) {
builder.error("Expression expected");
builder.error("Expression expected")
while (!builder.eof()) {
builder.advanceLexer();
builder.advanceLexer()
}
}
}
@@ -107,14 +107,14 @@ abstract class KtClassOrObject :
fun isAnnotation(): Boolean = hasModifier(KtTokens.ANNOTATION_KEYWORD)
override fun delete() {
CheckUtil.checkWritable(this);
CheckUtil.checkWritable(this)
val file = getContainingKtFile();
val file = getContainingKtFile()
if (!isTopLevel() || file.declarations.size > 1) {
super.delete()
}
else {
file.delete();
file.delete()
}
}
}
@@ -38,7 +38,7 @@ abstract class KtCodeFragment(
private val context: PsiElement?
): KtFile((PsiManager.getInstance(_project) as PsiManagerEx).fileManager.createFileViewProvider(LightVirtualFile(name, KotlinFileType.INSTANCE, text), true), false), JavaCodeFragment {
private var viewProvider = super<KtFile>.getViewProvider() as SingleRootFileViewProvider
private var viewProvider = super.getViewProvider() as SingleRootFileViewProvider
private var imports = LinkedHashSet<String>()
init {
@@ -68,7 +68,7 @@ abstract class KtCodeFragment(
override fun getContext() = context
override fun getResolveScope() = context?.resolveScope ?: super<KtFile>.getResolveScope()
override fun getResolveScope() = context?.resolveScope ?: super.getResolveScope()
override fun clone(): KtCodeFragment {
val clone = cloneImpl(calcTreeElement().clone() as FileElement) as KtCodeFragment
@@ -87,7 +87,7 @@ abstract class KtConstructor<T : KtConstructor<T>> : KtDeclarationStub<KotlinPla
override fun getTextOffset(): Int {
return getConstructorKeyword()?.getTextOffset()
?: getValueParameterList()?.getTextOffset()
?: super<KtDeclarationStub>.getTextOffset()
?: super.getTextOffset()
}
override fun getUseScope(): SearchScope {
@@ -54,7 +54,7 @@ class KtEnumEntrySuperclassReferenceExpression :
}
override fun getReferencedNameAsName(): Name {
return referencedElement.getName()?.let { Name.identifier(it) } ?: SpecialNames.NO_NAME_PROVIDED;
return referencedElement.getName()?.let { Name.identifier(it) } ?: SpecialNames.NO_NAME_PROVIDED
}
override fun getReferencedNameElement(): PsiElement {
@@ -30,7 +30,7 @@ abstract class KtExpressionImpl(node: ASTNode) : KtElementImpl(node), KtExpressi
}
override fun replace(newElement: PsiElement): PsiElement {
return replaceExpression(this, newElement, { super<KtElementImpl>.replace(it) })
return replaceExpression(this, newElement, { super.replace(it) })
}
companion object {
@@ -89,7 +89,7 @@ class AnnotationChecker(private val additionalCheckers: Iterable<AdditionalAnnot
|| (existingTargetsForAnnotation.any { (it == null) != (useSiteTarget == null) })
if (duplicateAnnotation && !classDescriptor.isRepeatableAnnotation()) {
trace.report(Errors.REPEATED_ANNOTATION.on(entry));
trace.report(Errors.REPEATED_ANNOTATION.on(entry))
}
existingTargetsForAnnotation.add(useSiteTarget)
@@ -26,6 +26,6 @@ interface DeclarationChecker {
declaration: KtDeclaration,
descriptor: DeclarationDescriptor,
diagnosticHolder: DiagnosticSink,
bindingContext: BindingContext);
bindingContext: BindingContext)
}
@@ -69,9 +69,9 @@ class DelegationResolver<T : CallableMemberDescriptor> private constructor(
val alreadyDelegated = delegatedMembers.firstOrNull { isOverridableBy(it, candidate) }
if (alreadyDelegated != null) {
trace.report(MANY_IMPL_MEMBER_NOT_IMPLEMENTED.on(classOrObject, classOrObject, alreadyDelegated))
return true;
return true
}
return false;
return false
}
@@ -272,7 +272,7 @@ object ModifierCheckerCore {
for (second in children) {
for (first in children) {
if (first == second) {
break;
break
}
checkCompatibility(trace, first, second, list.owner, incorrectNodes)
}
@@ -85,11 +85,11 @@ private class ExplicitTypeBinding(
// todo fix for List<*>
val jetTypeReference = psiTypeArguments[index]
val jetTypeElement = jetTypeReference?.typeElement
if (jetTypeElement == null) return@map null;
if (jetTypeElement == null) return@map null
if (isErrorBinding) {
val nextJetType = trace[BindingContext.TYPE, jetTypeReference]
if (nextJetType == null) return@map null;
if (nextJetType == null) return@map null
return@map TypeArgumentBindingImpl(
TypeProjectionImpl(nextJetType),
@@ -96,7 +96,7 @@ class TypeResolver(
val lazyKotlinType = LazyKotlinType()
c.trace.record(BindingContext.TYPE, typeReference, lazyKotlinType)
return type(lazyKotlinType);
return type(lazyKotlinType)
}
val type = doResolvePossiblyBareType(c, typeReference)
@@ -207,7 +207,7 @@ class VarianceCheckerCore(
when (descriptor) {
is FunctionDescriptorImpl -> descriptor.visibility = Visibilities.PRIVATE_TO_THIS
is PropertyDescriptorImpl -> {
descriptor.visibility = Visibilities.PRIVATE_TO_THIS;
descriptor.visibility = Visibilities.PRIVATE_TO_THIS
for (accessor in descriptor.accessors) {
(accessor as PropertyAccessorDescriptorImpl).visibility = Visibilities.PRIVATE_TO_THIS
}
@@ -161,7 +161,7 @@ class CandidateResolver(
val candidateReflectionType = getReflectionTypeForCandidateDescriptor(
candidate, reflectionTypes,
call.callElement.parent.let { it is KtCallableReferenceExpression && it.isEmptyLHS }
);
)
if (candidateReflectionType != null) {
if (!KotlinTypeChecker.DEFAULT.isSubtypeOf(candidateReflectionType, expectedType)) {
candidateCall.addStatus(OTHER_ERROR)
@@ -384,7 +384,7 @@ class CandidateResolver(
val dataFlowValue = DataFlowValueFactory.createDataFlowValue(expression, type, context)
val smartCastResult = SmartCastManager.checkAndRecordPossibleCast(dataFlowValue, expectedType, expression, context, null, false)
if (smartCastResult == null || !smartCastResult.isCorrect) {
context.trace.report(Errors.SPREAD_OF_NULLABLE.on(spreadElement));
context.trace.report(Errors.SPREAD_OF_NULLABLE.on(spreadElement))
}
}
}
@@ -250,7 +250,7 @@ private class ConstantExpressionEvaluatorVisitor(
private fun createStringConstant(compileTimeConstant: CompileTimeConstant<*>): TypedCompileTimeConstant<String>? {
val constantValue = compileTimeConstant.toConstantValue(TypeUtils.NO_EXPECTED_TYPE)
if (constantValue.isStandaloneOnlyConstant()) {
return null;
return null
}
return when (constantValue) {
is ErrorValue, is EnumValue -> return null
@@ -533,7 +533,7 @@ private class ConstantExpressionEvaluatorVisitor(
}
override fun visitSimpleNameExpression(expression: KtSimpleNameExpression, expectedType: KotlinType?): CompileTimeConstant<*>? {
val enumDescriptor = trace.bindingContext.get(BindingContext.REFERENCE_TARGET, expression);
val enumDescriptor = trace.bindingContext.get(BindingContext.REFERENCE_TARGET, expression)
if (enumDescriptor != null && DescriptorUtils.isEnumEntry(enumDescriptor)) {
return factory.createEnumValue(enumDescriptor as ClassDescriptor).wrap()
}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.resolve.inline;
package org.jetbrains.kotlin.resolve.inline
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.diagnostics.Errors
@@ -144,7 +144,7 @@ class LazyAnnotationDescriptor(
@Suppress("UNCHECKED_CAST")
return resolutionResults.resultingCall.valueArguments
.mapValues { val (valueParameter, resolvedArgument) = it;
.mapValues { val (valueParameter, resolvedArgument) = it
if (resolvedArgument == null) null
else c.annotationResolver.getAnnotationArgumentValue(c.trace, valueParameter, resolvedArgument)
}
@@ -193,7 +193,7 @@ open class LazyClassMemberScope(
if (descriptor.kind != FAKE_OVERRIDE && descriptor.kind != DELEGATION) {
OverridingUtil.resolveUnknownVisibilityForMember(descriptor, OverrideResolver.createCannotInferVisibilityReporter(trace))
}
VarianceCheckerCore(trace.bindingContext, DiagnosticSink.DO_NOTHING).recordPrivateToThisIfNeeded(descriptor);
VarianceCheckerCore(trace.bindingContext, DiagnosticSink.DO_NOTHING).recordPrivateToThisIfNeeded(descriptor)
}
}
@@ -189,7 +189,7 @@ internal class FunctionsTypingVisitor(facade: ExpressionTypingInternals) : Expre
functionTypeExpected: Boolean
): KotlinType {
val expectedReturnType = if (functionTypeExpected) getReturnTypeFromFunctionType(context.expectedType) else null
val returnType = computeUnsafeReturnType(expression, context, functionDescriptor, expectedReturnType);
val returnType = computeUnsafeReturnType(expression, context, functionDescriptor, expectedReturnType)
if (!expression.functionLiteral.hasDeclaredReturnType() && functionTypeExpected) {
if (!TypeUtils.noExpectedType(expectedReturnType!!) && KotlinBuiltIns.isUnit(expectedReturnType)) {
@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.asJava;
package org.jetbrains.kotlin.asJava
import com.intellij.psi.PsiClass;
import org.jetbrains.kotlin.name.FqName;
import com.intellij.psi.PsiClass
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.psi.KtClassOrObject
interface KtLightClass : PsiClass, KtLightDeclaration<KtClassOrObject, PsiClass> {
@@ -88,8 +88,8 @@ private fun createSynthesizedFunctionWithFirstParameterAsReceiver(descriptor: Fu
result.isExternal = original.isExternal
result.isInline = original.isInline
result.isTailrec = original.isTailrec
result.setHasStableParameterNames(false);
result.setHasSynthesizedParameterNames(true);
result.setHasStableParameterNames(false)
result.setHasSynthesizedParameterNames(true)
return result
}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen;
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.backend.common.output.OutputFile
import org.jetbrains.kotlin.inline.inlineFunctionsJvmNames
@@ -57,7 +57,7 @@ class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
val className = "test.A.B.C"
val psiClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project))
assertNotNull(psiClass, "Psi class not found for $className")
assertTrue(psiClass !is KtLightClass, "Kotlin light classes are not not expected");
assertTrue(psiClass !is KtLightClass, "Kotlin light classes are not not expected")
val binaryClass = JvmVirtualFileFinder.SERVICE.getInstance(project).findKotlinClass(JavaClassImpl(psiClass!!))
assertNotNull(binaryClass, "No binary class for $className")
@@ -171,7 +171,7 @@ class CapturedTypeApproximationTest : KotlinTestWithEnvironment() {
}
fun testSimpleT() {
doTest("simpleT.txt", "T");
doTest("simpleT.txt", "T")
}
fun testNullableT() {
@@ -179,19 +179,19 @@ class CapturedTypeApproximationTest : KotlinTestWithEnvironment() {
}
fun testUseSiteInT() {
doTest("useSiteInT.txt", "in T");
doTest("useSiteInT.txt", "in T")
}
fun testUseSiteInNullableT() {
doTest("useSiteInNullableT.txt", "in T?");
doTest("useSiteInNullableT.txt", "in T?")
}
fun testUseSiteOutT() {
doTest("useSiteOutT.txt", "out T");
doTest("useSiteOutT.txt", "out T")
}
fun testUseSiteOutNullableT() {
doTest("useSiteOutNullableT.txt", "out T?");
doTest("useSiteOutNullableT.txt", "out T?")
}
fun testTwoVariables() {