mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
"protocol" => "interface"
This commit is contained in:
committed by
Christoffer Lerno
parent
e380075852
commit
d01d8d3663
@@ -1,9 +1,9 @@
|
||||
module test;
|
||||
|
||||
protocol Abc : Def
|
||||
interface Abc : Def
|
||||
{}
|
||||
|
||||
protocol Def
|
||||
interface Def
|
||||
{}
|
||||
|
||||
fn void! test()
|
||||
@@ -18,5 +18,5 @@ fn void! test2()
|
||||
Abc* x;
|
||||
any* d = x;
|
||||
Def* e = x;
|
||||
x = e; // #error: is not a parent protocol of 'Def'
|
||||
x = e; // #error: is not a parent interface of 'Def'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module test;
|
||||
|
||||
protocol Abc
|
||||
interface Abc
|
||||
{
|
||||
fn void abc();
|
||||
fn void abc(); // #error: Duplicate definition
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
protocol TestProto
|
||||
interface TestProto
|
||||
{
|
||||
fn int test(int ag);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
|
||||
protocol Abc
|
||||
interface Abc
|
||||
{
|
||||
fn int[<2>] test() @optional;
|
||||
fn int bye();
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
module inherit;
|
||||
import std::io;
|
||||
|
||||
protocol Base
|
||||
interface Base
|
||||
{
|
||||
fn void tesT();
|
||||
}
|
||||
|
||||
protocol TestProto2 : Base
|
||||
interface TestProto2 : Base
|
||||
{
|
||||
}
|
||||
|
||||
protocol TestProto : Base
|
||||
interface TestProto : Base
|
||||
{
|
||||
fn void hello();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
|
||||
protocol Test {}
|
||||
interface Test {}
|
||||
|
||||
fn void main()
|
||||
{
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
module overlap;
|
||||
import std::io;
|
||||
|
||||
protocol TestProto
|
||||
interface TestProto
|
||||
{
|
||||
fn void tesT();
|
||||
}
|
||||
|
||||
protocol TestProto2
|
||||
interface TestProto2
|
||||
{
|
||||
fn void tesT();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module test;
|
||||
import std::io;
|
||||
|
||||
protocol Abc
|
||||
interface Abc
|
||||
{
|
||||
fn void test();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user