I'm trying to get a simple index offset:
func foo<Bytes: Collection>(data: Bytes) where Bytes.Element == UInt8 {
let nextFrameStartIndex = data.index(data.startIndex, offsetBy: 10, limitedBy: data.endIndex)
}
If I put the integer literal 10 there it compiles just fine. If I instead create a variable of type Int and pass that I get a compiler error:
"Cannot invoke 'index' with an argument list of type '(Bytes.Index, offsetBy: Int, limitedBy: Bytes.index)'