Closed johnynek closed 5 months ago
failed in PR: https://github.com/johnynek/bosatsu/pull/1102 so should fail against master 78a2951d96983f3f8ff9e45ec21787734e55075f
List(
ListPat(
List(
NamedList(Name("kobpwjG")),
Item(StrPat(NonEmptyList(NamedChar(Name("nh0nLwb")), List()))),
Item(Named(Operator("?"), StrPat(NonEmptyList(NamedChar(Name("lday3stkt")), List())))),
Item(Literal(Integer(-2607897800403171538)))
)
),
ListPat(
List(
Item(ListPat(List(Item(Var(Operator("$"))), Item(Var(Operator("%"))), WildList)))
)
)
)
Note this pattern is ill-typed anyway. No value is the same type as all the items in this list.
simplifying this:
// these are ill typed because the first pattern matches type
// List[String] but the second matches List[List[String]]
val r1 @ (_ :: _ :: _) = patterns("""[[*foo, "$.{_}", "1"], [[_, *_]]]""")
patterns("""[[*foo, "$.{_}", "$.{_}"], [[b, *_]]]""") ::
so, test fails, but the pattern is ill typed, and all well typed translations seems to pass.