Use '$' instead of '-' in package part class names
Otherwise some tools break (e.g. CheckMethodAdapter in ASM, used in generic signature writer) because they expect class names to be Java identifiers. Some tests fixed, some will be fixed in future commits
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ public class PackagePartClassUtils {
|
||||
String fileName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(file.getName()));
|
||||
|
||||
// path hashCode to prevent same name / different path collision
|
||||
String srcName = facadeFqName.shortName().asString() + "-" + replaceSpecialSymbols(fileName) + "-" + Integer.toHexString(
|
||||
String srcName = facadeFqName.shortName().asString() + "$" + replaceSpecialSymbols(fileName) + "$" + Integer.toHexString(
|
||||
getPathHashCode(file));
|
||||
|
||||
return facadeFqName.parent().child(Name.identifier(srcName));
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import java.util.HashMap
|
||||
import java.io.File
|
||||
|
||||
public fun IncrementalCache.getPackagesWithRemovedFiles(sourceFilesToCompile: Collection<JetFile>): Collection<FqName> {
|
||||
return getRemovedPackageParts(sourceFilesToCompile).map { it.getFqNameForClassNameWithoutDollars().parent() }
|
||||
return getRemovedPackageParts(sourceFilesToCompile).map { it.getPackageFqName() }
|
||||
}
|
||||
|
||||
public fun IncrementalCache.getRemovedPackageParts(sourceFilesToCompile: Collection<JetFile>): Collection<JvmClassName> {
|
||||
|
||||
Reference in New Issue
Block a user