1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 00:20:25 +02:00

Corlib helper methods

This commit is contained in:
Brian Fiete 2022-08-26 15:42:35 -07:00
parent 6eddf12948
commit 74b73e5dc8
5 changed files with 116 additions and 2 deletions

View file

@ -292,6 +292,13 @@ namespace System
Runtime.FatalError("Assert failed");
}
[Comptime(ConstEval = true)]
public static void Assert(bool cond, String message)
{
if (!cond)
Runtime.FatalError(message);
}
static extern void Comptime_SetReturnType(int32 typeId);
static extern void* Comptime_MethodBuilder_EmitStr(void* native, StringView str);
static extern void* Comptime_CreateMethod(int32 typeId, StringView methodName, Type returnType, MethodFlags methodFlags);