mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Don't treat missing imports as a fatal error in REPL mode.
We don't want typos in import statements to take down the whole REPL, but we /do/ want the REPL to be honoring fatal errors that effectively take down the ASTContext. This doesn't (yet) apply to the real LLDB REPL, which does not use SourceFileKind::REPL for its input. The right option to test there is LangOpts.DebuggerSupport, but that's currently being set for Playgrounds as well. I've filed <rdar://problem/18090611> for LLDB to adjust their input. Part of <rdar://problem/17994094> Swift SVN r21383
This commit is contained in:
@@ -299,7 +299,7 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
|
||||
isFramework)) {
|
||||
if (err != std::errc::no_such_file_or_directory) {
|
||||
Ctx.Diags.diagnose(moduleID.second, diag::sema_opening_import,
|
||||
moduleID.first.str(), err.message());
|
||||
moduleID.first, err.message());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user