blob: 1c2e02300abe7614d3a3e3e11bf5bf6e7ea09a86 [file]
-- Test that pattern matching on the `String.ofByteArray` constructor works correctly
-- at runtime.
def getBytes (s : String) : ByteArray :=
match s with
| ⟨bs, _⟩ => bs
#eval getBytes "hello" |>.size
#eval getBytes "" |>.size
#eval getBytes "α" |>.size