Skip to content

Commit dae17c2

Browse files
committed
Merge upstream stable (dlang/dmd@a04cb14657)
1 parent bcf3b6e commit dae17c2

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

dmd/dmodule.d

+8
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,14 @@ else
676676
errorSupplemental(loc, "config file: %.*s", cast(int)dmdConfFile.length, dmdConfFile.ptr);
677677
}
678678
}
679+
else if (FileName.ext(this.arg) || !loc.isValid())
680+
{
681+
// Modules whose original argument name has an extension, or do not
682+
// have a valid location come from the command-line.
683+
// Error that their file cannot be found and return early.
684+
.error(loc, "cannot find input file `%s`", srcfile.toChars());
685+
return false;
686+
}
679687
else
680688
{
681689
// if module is not named 'package' but we're trying to read 'package.d', we're looking for a package module

dmd/file_manager.d

+1-5
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,7 @@ nothrow:
185185
if (res == 1)
186186
return readToFileBuffer(name);
187187

188-
const fullName = lookForSourceFile(name, global.path ? (*global.path)[] : null);
189-
if (!fullName)
190-
return null;
191-
192-
return readToFileBuffer(fullName);
188+
return null;
193189
}
194190

195191
extern(C++) FileBuffer* lookup(const(char)* filename)

0 commit comments

Comments
 (0)