Skip to content

Commit 00e4559

Browse files
committed
Bump the compiler version to 4.2 (and 3.4)
Whether there's going to be an actual 4.2 release or we go straight to 5.0, we're not 4.1 anymore.
1 parent e04ded9 commit 00e4559

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ set_property(CACHE SWIFT_ANALYZE_CODE_COVERAGE PROPERTY
119119
# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
120120
# can be reused when a new version of Swift comes out (assuming the user hasn't
121121
# manually set it as part of their own CMake configuration).
122-
set(SWIFT_VERSION "4.1")
122+
set(SWIFT_VERSION "4.2")
123123

124124
set(SWIFT_VENDOR "" CACHE STRING
125125
"The vendor name of the Swift compiler")

lib/Basic/Version.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ Optional<Version> Version::getEffectiveLanguageVersion() const {
319319
switch (Components[0]) {
320320
case 3:
321321
#ifdef SWIFT_VERSION_PATCHLEVEL
322-
return Version{3, 3, SWIFT_VERSION_PATCHLEVEL};
322+
return Version{3, 4, SWIFT_VERSION_PATCHLEVEL};
323323
#else
324-
return Version{3, 3};
324+
return Version{3, 4};
325325
#endif
326326
case 4:
327327
static_assert(SWIFT_VERSION_MAJOR == 4,

test/Parse/ConditionalCompilation/language_version_explicit.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,19 @@
2121
asdf asdf asdf asdf
2222
#endif
2323

24-
#if swift(>=4.0.1)
25-
let z = 1
24+
// NOTE: Please modify this condition...
25+
#if swift(>=4.2)
26+
let b = 1
2627
#else
2728
// This shouldn't emit any diagnostics.
2829
asdf asdf asdf asdf
2930
#endif
3031

32+
// NOTE: ...and modify this condition...
33+
#if swift(>=4.2.1)
34+
// This shouldn't emit any diagnostics.
35+
asdf asdf asdf asdf
36+
#else
37+
let c = 1
38+
#endif
39+
// NOTE: ...the next time the version goes up.

test/Serialization/Recovery/crash-recovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Sub: Base {
1414

1515
// CHECK-CRASH: error: fatal error encountered while reading from module 'Lib'; please file a bug report with your project and the crash log
1616
// CHECK-CRASH-3-NOT: note
17-
// CHECK-CRASH-4: note: compiling as Swift 4.1, with 'Lib' built as Swift 3.3
17+
// CHECK-CRASH-4: note: compiling as Swift 4.2, with 'Lib' built as Swift 3.4
1818
// CHECK-CRASH-LABEL: *** DESERIALIZATION FAILURE (please include this section in any bug report) ***
1919
// CHECK-CRASH: could not find 'disappearingMethod()' in parent class
2020
// CHECK-CRASH: While loading members for 'Sub' in module 'Lib'

test/Serialization/Recovery/types-4-to-3.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import Lib
1616
func requiresConformance(_: B_RequiresConformance<B_ConformsToProto>) {}
1717
func requiresConformance(_: B_RequiresConformance<C_RelyOnConformanceImpl.Assoc>) {}
1818

19-
class Sub: Base {} // expected-error {{cannot inherit from class 'Base' (compiled with Swift 4.1) because it has overridable members that could not be loaded in Swift 3.3}}
20-
class Impl: Proto {} // expected-error {{type 'Impl' cannot conform to protocol 'Proto' (compiled with Swift 4.1) because it has requirements that could not be loaded in Swift 3.3}}
19+
class Sub: Base {} // expected-error {{cannot inherit from class 'Base' (compiled with Swift 4.2) because it has overridable members that could not be loaded in Swift 3.4}}
20+
class Impl: Proto {} // expected-error {{type 'Impl' cannot conform to protocol 'Proto' (compiled with Swift 4.2) because it has requirements that could not be loaded in Swift 3.4}}
2121

2222
#else // TEST
2323

utils/build_swift/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
CMAKE_GENERATOR = 'Ninja'
4141

4242
COMPILER_VENDOR = 'none'
43-
SWIFT_USER_VISIBLE_VERSION = CompilerVersion('4.1')
43+
SWIFT_USER_VISIBLE_VERSION = CompilerVersion('4.2')
4444
CLANG_USER_VISIBLE_VERSION = CompilerVersion('5.0.0')
4545
SWIFT_ANALYZE_CODE_COVERAGE = 'false'
4646

0 commit comments

Comments
 (0)