mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Use effective language version for "module too old".
People were getting confused when it said "module compiled with Swift 3.1 cannot be imported into Swift 4.0" when they were passing "-swift-version 3". rdar://problem/32187112
This commit is contained in:
@@ -232,7 +232,7 @@ FileUnit *SerializedModuleLoader::loadAST(
|
||||
|
||||
SmallString<32> versionBuf;
|
||||
llvm::raw_svector_ostream versionString(versionBuf);
|
||||
versionString << version::Version::getCurrentLanguageVersion();
|
||||
versionString << Ctx.LangOpts.EffectiveLanguageVersion;
|
||||
if (versionString.str() == shortVersion)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user