Skip to content

Commit

Permalink
Merge pull request #3763 from xuwei-k/Completions-strict
Browse files Browse the repository at this point in the history
make strict some methods in Completions
  • Loading branch information
dwijnand committed Nov 23, 2017
2 parents 8b1cab0 + b8086e0 commit d45f817
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,23 @@ object Completion {
val empty: Completion = suggestion("")
def single(c: Char): Completion = suggestion(c.toString)

// TODO: make strict in 0.13.0 to match DisplayOnly
def displayOnly(value: => String): Completion = new DisplayOnly(value)
def displayOnly(value: String): Completion = new DisplayOnly(value)

// TODO: make strict in 0.13.0 to match Token
def token(prepend: => String, append: => String): Completion =
def token(prepend: String, append: String): Completion =
new Token(prepend + append, append)

/** @since 0.12.1 */
def tokenDisplay(append: String, display: String): Completion = new Token(display, append)

// TODO: make strict in 0.13.0 to match Suggestion
def suggestion(value: => String): Completion = new Suggestion(value)
def suggestion(value: String): Completion = new Suggestion(value)

@deprecated("No longer used. for binary compatibility", "1.1.0")
private[complete] def displayOnly(value: => String): Completion = new DisplayOnly(value)

@deprecated("No longer used. for binary compatibility", "1.1.0")
private[complete] def token(prepend: => String, append: => String): Completion =
new Token(prepend + append, append)

@deprecated("No longer used. for binary compatibility", "1.1.0")
private[complete] def suggestion(value: => String): Completion = new Suggestion(value)
}

0 comments on commit d45f817

Please sign in to comment.