Minor, drop some obsolete usages of TRAIT in compiler
This commit is contained in:
@@ -156,7 +156,7 @@ public class PropertyCodegen {
|
||||
|
||||
boolean isDefaultAccessor = accessor == null || !accessor.hasBody();
|
||||
|
||||
// Don't generate accessors for trait properties with default accessors in TRAIT_IMPL
|
||||
// Don't generate accessors for interface properties with default accessors in DefaultImpls
|
||||
if (kind == OwnerKind.DEFAULT_IMPLS && isDefaultAccessor) return false;
|
||||
|
||||
if (declaration == null) return true;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ModifiersChecker {
|
||||
private enum InnerModifierCheckResult {
|
||||
ALLOWED,
|
||||
ILLEGAL_POSITION,
|
||||
IN_TRAIT,
|
||||
IN_INTERFACE,
|
||||
IN_OBJECT,
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ModifiersChecker {
|
||||
if (!(containingDeclaration instanceof ClassDescriptor)) return InnerModifierCheckResult.ILLEGAL_POSITION;
|
||||
|
||||
if (DescriptorUtils.isInterface(containingDeclaration)) {
|
||||
return InnerModifierCheckResult.IN_TRAIT;
|
||||
return InnerModifierCheckResult.IN_INTERFACE;
|
||||
}
|
||||
else if (DescriptorUtils.isObject(containingDeclaration)) {
|
||||
return InnerModifierCheckResult.IN_OBJECT;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.kotlin.resolve.jvm;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi;
|
||||
import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
|
||||
@@ -51,8 +50,6 @@ public class JvmClassName {
|
||||
return byFqNameWithoutInnerClasses(new FqName(fqName));
|
||||
}
|
||||
|
||||
private final static String TRAIT_IMPL_REPLACE_GUARD = "<trait_impl>";
|
||||
|
||||
// Internal name: kotlin/Map$Entry
|
||||
// FqName: kotlin.Map.Entry
|
||||
|
||||
@@ -69,12 +66,7 @@ public class JvmClassName {
|
||||
@NotNull
|
||||
public FqName getFqNameForClassNameWithoutDollars() {
|
||||
if (fqName == null) {
|
||||
String fqName = internalName
|
||||
.replace(JvmAbi.DEFAULT_IMPLS_CLASS_NAME, TRAIT_IMPL_REPLACE_GUARD)
|
||||
.replace('$', '.')
|
||||
.replace('/', '.')
|
||||
.replace(TRAIT_IMPL_REPLACE_GUARD, JvmAbi.DEFAULT_IMPLS_CLASS_NAME);
|
||||
this.fqName = new FqName(fqName);
|
||||
this.fqName = new FqName(internalName.replace('$', '.').replace('/', '.'));
|
||||
}
|
||||
return fqName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user