Minor, add toString() for debug

This commit is contained in:
Alexander Udalov
2016-10-28 11:21:11 +03:00
parent 9e9c548ca3
commit 65882579bc
3 changed files with 16 additions and 1 deletions
@@ -29,5 +29,8 @@ interface PsiSourceElement : SourceElement {
class PsiSourceFile(val psiFile: PsiFile): SourceFile {
override fun equals(other: Any?): Boolean = other is PsiSourceFile && psiFile == other.psiFile
override fun hashCode(): Int = psiFile.hashCode()
override fun toString(): String = psiFile.virtualFile.path
}
@@ -303,6 +303,11 @@ public abstract class BaseDiagnosticsTest
public int compareTo(@NotNull TestModule module) {
return name.compareTo(module.getName());
}
@Override
public String toString() {
return getName();
}
}
public static class DiagnosticTestLanguageVersionSettings implements LanguageVersionSettings {
@@ -510,5 +515,10 @@ public abstract class BaseDiagnosticsTest
}
return jvmSignatureDiagnostics;
}
@Override
public String toString() {
return jetFile.getName();
}
}
}
@@ -47,5 +47,7 @@ interface ModuleDescriptor : DeclarationDescriptor {
fun <T> getCapability(capability: Capability<T>): T?
class Capability<T>(val name: String)
class Capability<T>(val name: String) {
override fun toString() = name
}
}