Rename def to alias.

This commit is contained in:
Christoffer Lerno
2025-03-13 11:22:27 +01:00
parent ae76839347
commit 8b49e6c14d
193 changed files with 790 additions and 776 deletions

View File

@@ -3,7 +3,7 @@ module test;
import std::io;
import std::collections::enumset;
def AbcEnumSet = EnumSet{Abc};
alias AbcEnumSet = EnumSet{Abc};
enum Abc
{

View File

@@ -9,4 +9,4 @@ fn void abc()
module tester;
import foo;
def abc_my = foo::abc{int};
alias abc_my = foo::abc{int};

View File

@@ -2,7 +2,7 @@
module test;
import bar;
def BazTest = Baz{Test}; // #error: Recursive definition of 'BazTest'
alias BazTest = Baz{Test}; // #error: Recursive definition of 'BazTest'
struct Test
{

View File

@@ -14,8 +14,8 @@ fn Type addMult(Type x, Type a, Type b)
module test;
import gen;
def intMult = gen::mult{int};
def doubleAddMult = gen::addMult{double};
alias intMult = gen::mult{int};
alias doubleAddMult = gen::addMult{double};
fn int getIt(int i)
{

View File

@@ -5,7 +5,7 @@ module abc{Type};
import std::io;
import std::collections::list;
def TextTagList = List{TextTag};
alias TextTagList = List{TextTag};
fault UNTERMINATED_TAG, EMPTY_TAG, MISSING_TAG, UNSUPPORTED_TAG;
@@ -127,7 +127,7 @@ module text_test;
import abc;
import std::io;
def Tmpl = TextTemplate{Data};
alias Tmpl = TextTemplate{Data};
struct Data
{
@@ -138,8 +138,8 @@ struct Data
def FooTmpl = TextTemplate{Foo};
def BarTmpl = TextTemplate{Bar};
alias FooTmpl = TextTemplate{Foo};
alias BarTmpl = TextTemplate{Bar};
struct Foo
{

View File

@@ -2,7 +2,7 @@ module testing;
import std::io;
import foo;
def Foo = foo::Foo;
alias Foo = foo::Foo;
fn void main()
{

View File

@@ -8,7 +8,7 @@ fn Type x(Type t)
module test;
import hello;
def xint = hello::x{int, -123};
alias xint = hello::x{int, -123};
import std::io;

View File

@@ -1,6 +1,6 @@
module test;
import std;
def ListStr = List{String};
alias ListStr = List{String};
fn void test()
{
List<String> a = List<...>.new_init(); // #error: An expression was expected

View File

@@ -3,7 +3,7 @@ module test;
import std::io;
import std::collections::list;
def TreeNodeList = List{TreeNode};
alias TreeNodeList = List{TreeNode};
struct TreeNode
{

View File

@@ -23,7 +23,7 @@ macro void print_it(...)
module playground;
import playground::bug;
def MyFoo = Foo{int};
alias MyFoo = Foo{int};
fn void main(String[] args)
{

View File

@@ -1,14 +1,14 @@
// #target: macos-x64
module test{Type};
def Callback = fn Type();
alias Callback = fn Type();
module mymain;
import std::io;
import test;
def VoidCb = test::Callback{void};
alias VoidCb = test::Callback{void};
fn int main()
{

View File

@@ -2,8 +2,8 @@ module test;
import std::io;
import abc;
def Def2 = Def;
def Test = abc::cde::Abc{int};
alias Def2 = Def;
alias Test = abc::cde::Abc{int};
module abc;

View File

@@ -7,5 +7,5 @@ struct Foo
module bar;
import foo;
def Bar = Foo{int, int}; // #error: Expected a value, not a type
def Baz = Foo{5, 4}; // #error: Expected a type, not a value
alias Bar = Foo{int, int}; // #error: Expected a value, not a type
alias Baz = Foo{5, 4}; // #error: Expected a type, not a value

View File

@@ -1,7 +1,7 @@
// #target: macos-x64
module broken{Type};
distinct Bar = Type;
def Bar2 = Type;
alias Bar2 = Type;
struct Baz
{
int a;