Minor, drop unused directive and test

The directive was only used in this test and it had no effect on the
behavior of the test. The test is removed because it's equivalent to
simple.kt in the same directory
This commit is contained in:
Alexander Udalov
2017-03-29 12:41:58 +03:00
parent bff9ebc0d5
commit 8dc4fa62ac
4 changed files with 2 additions and 69 deletions
@@ -1,21 +0,0 @@
// !LANGUAGE_VERSION: 1.0
public interface Base {
fun getValue(): String
fun test() = getValue()
}
class Delegate : Base {
override fun getValue() = "Delegate"
}
public abstract class MyClass : Base {
override fun test(): String {
return "Class"
}
}
<!DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE!>class A<!> : MyClass(), Base by Delegate() {
override fun getValue() = "Delegate"
}
@@ -1,36 +0,0 @@
package
public final class A : MyClass, Base {
public constructor A()
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*2*/ fun getValue(): kotlin.String
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*2*/ /*delegation*/ fun test(): kotlin.String
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface Base {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public abstract fun getValue(): kotlin.String
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open fun test(): kotlin.String
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class Delegate : Base {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ fun getValue(): kotlin.String
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun test(): kotlin.String
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public abstract class MyClass : Base {
public constructor MyClass()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public abstract override /*1*/ /*fake_override*/ fun getValue(): kotlin.String
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ fun test(): kotlin.String
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -279,7 +279,6 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
)
val LANGUAGE_DIRECTIVE = "LANGUAGE"
val LANGUAGE_VERSION = "LANGUAGE_VERSION"
private val LANGUAGE_PATTERN = Pattern.compile("(\\+|\\-|warn:)(\\w+)\\s*")
val DEFAULT_DIAGNOSTIC_TESTS_FEATURES = mapOf(
@@ -311,17 +310,14 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
private fun parseLanguageVersionSettings(directiveMap: Map<String, String>): LanguageVersionSettings? {
val apiVersionString = directiveMap[API_VERSION_DIRECTIVE]
val directives = directiveMap[LANGUAGE_DIRECTIVE]
val languageVersionDirective = directiveMap[LANGUAGE_VERSION]
if (apiVersionString == null && directives == null && languageVersionDirective == null) return null
if (apiVersionString == null && directives == null) return null
val apiVersion = (if (apiVersionString != null) ApiVersion.parse(apiVersionString) else ApiVersion.LATEST_STABLE)
?: error("Unknown API version: $apiVersionString")
val languageFeatures = directives?.let(this::collectLanguageFeatureMap).orEmpty()
val languageVersion: LanguageVersion = languageVersionDirective?.let { LanguageVersion.fromVersionString(it) } ?: LanguageVersion.LATEST_STABLE
return DiagnosticTestLanguageVersionSettings(languageFeatures, apiVersion, languageVersion)
return DiagnosticTestLanguageVersionSettings(languageFeatures, apiVersion, LanguageVersion.LATEST_STABLE)
}
private fun collectLanguageFeatureMap(directives: String): Map<LanguageFeature, LanguageFeature.State> {
@@ -6270,12 +6270,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("simple1.0.kt")
public void testSimple1_0() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simple1.0.kt");
doTest(fileName);
}
@TestMetadata("simpleNoOverride.kt")
public void testSimpleNoOverride() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleNoOverride.kt");