mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
15 lines
375 B
Plaintext
15 lines
375 B
Plaintext
module test;
|
|
typedef DString2 = inline char*;
|
|
interface Collectable
|
|
{
|
|
fn void append(void* element);
|
|
}
|
|
|
|
fn Collectable foo(Collectable c) { return c; }
|
|
|
|
fn int main()
|
|
{
|
|
foo((Collectable) (DString2) {}); // #error: You can only convert pointers to an interface like
|
|
foo((Collectable) (DString) {}); // #error: You can only convert pointers to an interface like
|
|
return 0;
|
|
} |