Complete transition to fn. Introduce global/threadlocal

This commit is contained in:
Christoffer Lerno
2021-11-16 17:19:12 +01:00
committed by Christoffer Lerno
parent e2621617f1
commit b52b42d4da
331 changed files with 1279 additions and 1261 deletions

View File

@@ -1,11 +1,11 @@
// #target: x64-windows
func int foo()
fn int foo()
{
return 1;
}
func void test()
fn void test()
{
int x = foo();
int y = foo();

View File

@@ -1,19 +1,19 @@
int x = 3;
func void test()
fn void test()
{
$assert(x == 3); // #error: Compile time evaluation requires a compile time constant value.
}
func void test2()
fn void test2()
{
int i = 0;
$assert(1);
$assert(i == 0); // #error: Compile time evaluation requires a compile time constant value.
}
func int foo();
func void test3()
fn int foo();
fn void test3()
{
int i = 0;
$assert(foo() == 0); // #error: Compile time evaluation requires a compile time constant value.

View File

@@ -1,7 +1,7 @@
const int FOO = 2;
func void test()
fn void test()
{
$assert(FOO == 2, "Bad");
$assert(FOO == 0, "Good"); // #error: Compile time assert - Good

View File

@@ -1,10 +1,10 @@
func int foo()
fn int foo()
{
return 1;
}
func void test()
fn void test()
{
int x = foo();
if (x > 0) return;