Adding 'Add open modifier to supertype' fix for FINAL_SUPERTYPE error.

This commit is contained in:
Wojciech Lopata
2013-01-20 18:20:29 +01:00
committed by Andrey Breslav
parent fe07fb4932
commit b4c21acafd
14 changed files with 211 additions and 0 deletions
@@ -0,0 +1,3 @@
// "Add 'open' modifier to supertype" "true"
open class A {}
class B : A<caret>() {}
@@ -0,0 +1,3 @@
// "Add 'open' modifier to supertype" "true"
open class A {}
class B : A<caret>() {}
@@ -0,0 +1,6 @@
// "Add 'open' modifier to supertype" "true"
trait X {}
trait Y {}
open class A {}
class B : X, A<caret>(), Y {}
@@ -0,0 +1,5 @@
// "Add 'open' modifier to supertype" "false"
// ERROR: This type is final, so it cannot be inherited from
// ERROR: Cannot access '<init>': it is 'private' in 'E'
enum class E {}
class A : E<caret>() {}
@@ -0,0 +1,3 @@
// "Add 'open' modifier to supertype" "true"
final class A {}
class B : A<caret>() {}
@@ -0,0 +1,3 @@
// "Add 'open' modifier to supertype" "false"
// ERROR: This type is final, so it cannot be inherited from
class A : String<caret>() {}
@@ -0,0 +1,3 @@
// "Add 'open' modifier to supertype" "true"
class A {}
class B : A<caret>() {}
@@ -0,0 +1,6 @@
// "Add 'open' modifier to supertype" "true"
trait X {}
trait Y {}
class A {}
class B : X, A<caret>(), Y {}
@@ -0,0 +1,3 @@
package testPackage;
public final class JavaClass {}
@@ -0,0 +1,5 @@
// "Add 'open' modifier to supertype" "false"
// ERROR: This type is final, so it cannot be inherited from
import testPackage.*
class foo : <caret>JavaClass() {}