Dynamic dispatch.

This commit is contained in:
Christoffer Lerno
2023-05-25 13:46:44 +02:00
committed by Christoffer Lerno
parent 2e498a426e
commit b794c893d6
50 changed files with 529 additions and 261 deletions

View File

@@ -26,12 +26,8 @@ struct Object
}
}
static initialize
{
io::formatter_register_type(Object);
}
fn void! Object.to_format(Object* o, Formatter* formatter)
fn void! Object.to_format(Object* o, Formatter* formatter) @dynamic
{
switch (o.type)
{