mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
15 lines
374 B
Plaintext
15 lines
374 B
Plaintext
typedef char as Number8;
|
|
typedef int as Number32;
|
|
|
|
func void test1()
|
|
{
|
|
int a = cast(10 as char);
|
|
int b = cast(200 as char);
|
|
int c = cast(200 as int);
|
|
char d = cast(200 as int); // #error: Cannot implicitly cast 'int' to 'char'.
|
|
}
|
|
|
|
func void test2()
|
|
{
|
|
char e = cast(200 as Number32); // #error: Cannot implicitly cast 'Number32' (int) to 'char'.
|
|
} |