Functions that return strings should be type hinted

Description

write-str (and maybe other functions) should be type-hinted that they return ^String.

This bit us when we switched from Cheshire to data.json in some code that was passing the result directly to a Java constructor that was overloaded on String and Object and we started to get the wrong behavior.

Cheshire has ^String on all functions that return strings, data.json doesn't.

Environment

None

Activity

Show:
Alex Miller
March 27, 2021, 12:28 PM

Applied

Fixed

Assignee

Alex Miller

Reporter

Sean Corfield