core.typed

Annotation for re-find return type is too specific

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

clojure.core/re-find returns different things depending on the regular expression used and the string it matches against. Currently core.typed annotates this as returning (Option String). However, in the presence of capture groups, it may return a vector of strings, so the current annotation is too specific.

Additionally, clojure.core/re-groups is not annotated, and uses the same return type as clojure.core/re-find.

Activity

Hide
Ambrose Bonnaire-Sergeant added a comment -

Merged.

Show
Ambrose Bonnaire-Sergeant added a comment - Merged.
Hide
Andrew Brehaut added a comment - - edited

This patch (CTYP-14.diff 07/Mar/13 9:10 PM) should extend the annotations to cover all return types.

Show
Andrew Brehaut added a comment - - edited This patch (CTYP-14.diff 07/Mar/13 9:10 PM) should extend the annotations to cover all return types.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: