mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
19 lines
349 B
Plaintext
19 lines
349 B
Plaintext
func void test1()
|
|
{
|
|
int myInt = 1;
|
|
int* p1 = myInt; // #error: Cannot implicitly cast 'int' to 'int*'.
|
|
}
|
|
|
|
func void test2()
|
|
{
|
|
uint myUInt = 1;
|
|
int* p2 = myUInt; // #error: Cannot implicitly cast 'uint' to 'int*'.
|
|
}
|
|
|
|
func void test3()
|
|
{
|
|
uint myUInt = 1;
|
|
int* p2 = cast(myUInt as int*);
|
|
}
|
|
|