mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Handle protocol inheritance. Allow overlapping protocol methods. Remove the need for &self in protocol declarations. Fix cast rules for protocol. Fix cast rules for bitstruct #1034.
This commit is contained in:
committed by
Christoffer Lerno
parent
99cfaa1583
commit
312a39ee24
@@ -6,8 +6,8 @@ const int PRINTF_NTOA_BUFFER_SIZE = 256;
|
||||
|
||||
protocol Printable
|
||||
{
|
||||
fn String to_string(&self, Allocator *using) @optional;
|
||||
fn usz! to_format(&self, Formatter* formatter) @optional;
|
||||
fn String to_string(Allocator *using) @optional;
|
||||
fn usz! to_format(Formatter* formatter) @optional;
|
||||
}
|
||||
|
||||
fault PrintFault
|
||||
|
||||
@@ -2,13 +2,13 @@ module std::math::random;
|
||||
|
||||
protocol Random
|
||||
{
|
||||
fn void set_seed(&self, char[] input);
|
||||
fn char next_byte(&self);
|
||||
fn ushort next_short(&self);
|
||||
fn uint next_int(&self);
|
||||
fn ulong next_long(&self);
|
||||
fn uint128 next_int128(&self);
|
||||
fn void next_bytes(&self, char[] buffer);
|
||||
fn void set_seed(char[] input);
|
||||
fn char next_byte();
|
||||
fn ushort next_short();
|
||||
fn uint next_int();
|
||||
fn ulong next_long();
|
||||
fn uint128 next_int128();
|
||||
fn void next_bytes(char[] buffer);
|
||||
}
|
||||
|
||||
macro Random.seed(&self, seed)
|
||||
|
||||
Reference in New Issue
Block a user