Correctly nest multiline pipeline expressions.

This commit is contained in:
KtorZ
2023-03-30 12:48:15 +02:00
parent cb5dc75326
commit 17431daaa4
4 changed files with 39 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ validator {
}
}
validator (output_reference: OutputReference) {
validator(output_reference: OutputReference) {
fn mint(_redeemer: Void, ctx: ScriptContext) -> Bool {
when
list.find(

View File

@@ -10,8 +10,10 @@ type DayOfTheWeek {
fn is_work(day: DayOfTheWeek) {
when day is {
Tuesday | Wednesday | Thursday | Friday | Saturday -> True
_ -> False
Tuesday | Wednesday | Thursday | Friday | Saturday ->
True
_ ->
False
}
}
@@ -25,10 +27,12 @@ test is_work_2() {
fn is_happy_hour(day: DayOfTheWeek, current_time: Int) {
when day is {
Monday | Sunday -> True
Monday | Sunday ->
True
Tuesday | Wednesday | Thursday | Friday | Saturday if current_time > 18 ->
True
_ -> False
_ ->
False
}
}