mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`. - Added `LANGUAGE_DEV_VERSION` env constant. - Rename `anyfault` -> `fault`. - Changed `fault` -> `faultdef`. - Added `attrdef` instead of `alias` for attribute aliases.
This commit is contained in:
committed by
Christoffer Lerno
parent
fc5615a7a1
commit
5c77c9a754
@@ -100,7 +100,7 @@ after_check3: ; preds = %loop.cond
|
||||
br label %noerr_block
|
||||
panic_block: ; preds = %assign_optional
|
||||
%4 = insertvalue %any undef, ptr %error_var, 0
|
||||
%5 = insertvalue %any %4, i64 ptrtoint (ptr @"$ct.anyfault" to i64), 1
|
||||
%5 = insertvalue %any %4, i64 ptrtoint (ptr @"$ct.fault" to i64), 1
|
||||
store %any %5, ptr %varargslots, align 16
|
||||
%6 = insertvalue %"any[]" undef, ptr %varargslots, 0
|
||||
%"$$temp" = insertvalue %"any[]" %6, i64 1, 1
|
||||
|
||||
@@ -4,7 +4,7 @@ fn void test1()
|
||||
foreach (a : x) { }; // #error: It's not possible to enumerate an expression of type 'int'
|
||||
}
|
||||
|
||||
distinct Test1 = int;
|
||||
typedef Test1 = int;
|
||||
|
||||
fn void test2()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
import std;
|
||||
distinct TypeA = char[];
|
||||
typedef TypeA = char[];
|
||||
|
||||
fn char TypeA.get(self, usz i) @operator([]) {
|
||||
return ((char[])self)[i];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
distinct Type = char*;
|
||||
typedef Type = char*;
|
||||
fn usz Type.len(str)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -4,7 +4,7 @@ fn void test1()
|
||||
foreach_r (a : x) { }; // #error: It's not possible to enumerate an expression of type 'int'
|
||||
}
|
||||
|
||||
distinct Test1 = int;
|
||||
typedef Test1 = int;
|
||||
|
||||
fn void test2()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
module foo;
|
||||
import std::io;
|
||||
|
||||
fault ABC;
|
||||
faultdef ABC;
|
||||
|
||||
fn void? test()
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@ fn void test_missing_no_cases(Baz x)
|
||||
}
|
||||
}
|
||||
|
||||
fault DIVISION_BY_ZERO;
|
||||
faultdef DIVISION_BY_ZERO;
|
||||
|
||||
// Rethrowing an error uses "!!" suffix
|
||||
fn void? testMayError()
|
||||
|
||||
@@ -3,8 +3,8 @@ module mymodule;
|
||||
|
||||
extern fn void printf(char *, ...);
|
||||
|
||||
fault FOO;
|
||||
fault BAR, BAZ;
|
||||
faultdef FOO;
|
||||
faultdef BAR, BAZ;
|
||||
|
||||
fn void test()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user