Fix compilation errors for the newly introduce test & add type inference.
Tests are basically functions for which the return type should unify with bool. In principle, the type checker could also check that a test function has no arguments but, a test function with arguments wouldn't parse in the first place; feels a bit hacky but it works when considering the pipeline as a whole. Note that the code generation is still to be done.
This commit is contained in:
@@ -11,3 +11,7 @@ pub fn spend(datum: sample.Datum, rdmr: sample.Redeemer, _ctx: Nil) -> Bool {
|
||||
|
||||
z == #(#[222], #[222])
|
||||
}
|
||||
|
||||
test foo() {
|
||||
1 + 1 == 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user