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

Attachments

1

Activity

Show:

Alex Miller March 27, 2021 at 12:28 PM

Applied

Fixed

Details

Assignee

Reporter

Priority

Created March 23, 2021 at 9:21 PM
Updated March 27, 2021 at 12:28 PM
Resolved March 27, 2021 at 12:28 PM