This PR fixes a segmentation fault that is crushing the app when calling a description function on Foundation.Date object for the second time (https://bugs.swift.org/browse/SR-2485).
Since BSON.Value.dateTime is still unsupported, we will try to print error message about unsupported enum case, which prints associated date, which causes a segmentation fault.
The "actual" bug is in deed not in the MongoDriver, but before Apple fixes SR-2485, we cannot print descriptions of Date on Linux more then once ;)
This PR fixes a segmentation fault that is crushing the app when calling a
description
function onFoundation.Date
object for the second time (https://bugs.swift.org/browse/SR-2485).Since
BSON.Value.dateTime
is still unsupported, we will try to print error message about unsupported enum case, which prints associateddate
, which causes a segmentation fault.The "actual" bug is in deed not in the MongoDriver, but before Apple fixes SR-2485, we cannot print descriptions of Date on Linux more then once ;)