Write JSON file with -Xi without -X/-Xf

Fixes dmd-testsuite's compilable/jsonNoOutFile.d.
This commit is contained in:
Martin Kinkelin 2021-09-09 01:54:40 +02:00
parent db4867d437
commit 64d79ef753

View file

@ -342,7 +342,7 @@ void parseCommandLine(Strings &sourceFiles) {
global.params.docdir.length || global.params.docname.length;
global.params.jsonfilename = opts::fromPathString(jsonFile);
if (global.params.jsonfilename.length) {
if (global.params.jsonfilename.length || !jsonFields.empty()) {
global.params.doJsonGeneration = true;
}