"protocol" => "interface"

This commit is contained in:
Christoffer Lerno
2023-10-20 12:42:36 +02:00
committed by Christoffer Lerno
parent e380075852
commit d01d8d3663
48 changed files with 322 additions and 325 deletions

View File

@@ -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'
}

View File

@@ -1,6 +1,6 @@
module test;
protocol Abc
interface Abc
{
fn void abc();
fn void abc(); // #error: Duplicate definition

View File

@@ -1,4 +1,4 @@
protocol TestProto
interface TestProto
{
fn int test(int ag);
}

View File

@@ -1,7 +1,7 @@
// #target: macos-x64
module test;
protocol Abc
interface Abc
{
fn int[<2>] test() @optional;
fn int bye();

View File

@@ -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();
}

View File

@@ -1,7 +1,7 @@
// #target: macos-x64
module test;
protocol Test {}
interface Test {}
fn void main()
{

View File

@@ -2,12 +2,12 @@
module overlap;
import std::io;
protocol TestProto
interface TestProto
{
fn void tesT();
}
protocol TestProto2
interface TestProto2
{
fn void tesT();
}

View File

@@ -1,7 +1,7 @@
module test;
import std::io;
protocol Abc
interface Abc
{
fn void test();
}