mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
compiler testdata: s/trait/interface
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
trait MyIterable<T> : Iterable<T>
|
||||
interface MyIterable<T> : Iterable<T>
|
||||
|
||||
class E : RuntimeException()
|
||||
fun foo(): MyIterable<String> = throw E()
|
||||
|
||||
@@ -6,7 +6,7 @@ class Test {
|
||||
if (!s.equals("Klass")) throw new AssertionError("Fail class: " + s);
|
||||
|
||||
s = Trait.NAME;
|
||||
if (!s.equals("Trait")) throw new AssertionError("Fail trait: " + s);
|
||||
if (!s.equals("Trait")) throw new AssertionError("Fail interface: " + s);
|
||||
|
||||
s = Enoom.NAME;
|
||||
if (!s.equals("Enoom")) throw new AssertionError("Fail enum: " + s);
|
||||
|
||||
@@ -4,7 +4,7 @@ class Klass {
|
||||
}
|
||||
}
|
||||
|
||||
trait Trait {
|
||||
interface Trait {
|
||||
companion object {
|
||||
val NAME = "Trait"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait A : MyInt {
|
||||
interface A : MyInt {
|
||||
override public fun test(): String? {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user