Open joshradin opened 3 years ago
Declare types with generic parameters. This will add semantic meaning to the a declaration like Type<A>, or Type<A : B>.
Type<A>
Type<A : B>
Declaring a struct with the generic types will be defined using the following grammar:
struct ID <{generic (: _parenttype)}> { ... }
Functions will be defined with the following grammar:
fn ID <{generic (: _parenttype)}> ( params ) ( -> return type ) { ... }
/cib
Branch feature/61-generic_classes_and_structures created!
Declare types with generic parameters. This will add semantic meaning to the a declaration like
Type<A>
, orType<A : B>
.Declaring a struct with the generic types will be defined using the following grammar:
struct ID <{generic (: _parenttype)}> { ... }
Functions will be defined with the following grammar:
fn ID <{generic (: _parenttype)}> ( params ) ( -> return type ) { ... }