Skip to content

Earlier entries in word boundary cache are cleared incorrectly #768

Closed
@milseman

Description

@milseman

This fails, because we clear earlier word boundary cache entries when we calculate later ones.

    // This will first find word boundaries up til the middle before failing,
    // then it will find word boundaries til late in the string, then fail,
    // and finally should succeed on a word boundary cached from the first
    // attempt.
    let input = "first second third fourth"
    let regex = try Regex(#".*second\bX|.*third\bX|.*first\b"#)
    XCTAssertTrue(input.contains(regex))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions