test: add test for "broken for"

This commit is contained in:
Leonardo de Moura 2020-12-25 09:44:00 -08:00
parent e21ea53661
commit f05cbd1365
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,6 @@
def g (xs ys : List Nat) (a : α) : IO Nat := do
let mut sum := 0
for x in xs, y in ys, c in a, z in ys do
sum := x + sum
IO.println s!"x: {x}, y: {y}, a: {a}, c: {c}, sum: {sum}"
return sum

View file

@ -0,0 +1,4 @@
forErrors.lean:3:29: error: failed to synthesize instance
ToStream α ?m
forErrors.lean:5:15: error: failed to synthesize instance
ToString α