mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
$typeof(<type>) returns typeinfo, causing errors #2795
This commit is contained in:
6
test/test_suite/compile_time/typeof_ct.c3
Normal file
6
test/test_suite/compile_time/typeof_ct.c3
Normal file
@@ -0,0 +1,6 @@
|
||||
fn int main()
|
||||
{
|
||||
int x;
|
||||
double df2 = ($typeof(double))(x); // #error: You cannot cast 'int' to 'typeid'
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user