Adding 'Add open modifier to supertype' fix for FINAL_SUPERTYPE error.
This commit is contained in:
committed by
Andrey Breslav
parent
fe07fb4932
commit
b4c21acafd
@@ -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 {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package testPackage;
|
||||
|
||||
public final class JavaClass {}
|
||||
+5
@@ -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() {}
|
||||
Reference in New Issue
Block a user