Skip to content

Commit efb4b54

Browse files
authored
Merge pull request #3105 from apple/stdlib-fix-class-box
2 parents 559b0b4 + ac73d7e commit efb4b54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/public/core/Process.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
import SwiftShims
1414

15-
internal class _Box<T> {
16-
var value = [String]()
17-
init(_ value : [String]) { self.value = value }
15+
internal class _Box<Wrapped> {
16+
internal var _value: Wrapped
17+
internal init(_ value: Wrapped) { self._value = value }
1818
}
1919

2020
/// Command-line arguments for the current process.
@@ -64,13 +64,13 @@ public enum Process {
6464

6565
// Check whether argument has been initialized.
6666
if let arguments = _stdlib_atomicLoadARCRef(object: argumentsPtr) {
67-
return (arguments as! _Box<[String]>).value
67+
return (arguments as! _Box<[String]>)._value
6868
}
6969

7070
let arguments = _Box<[String]>(_computeArguments())
7171
_stdlib_atomicInitializeARCRef(object: argumentsPtr, desired: arguments)
7272

73-
return arguments.value
73+
return arguments._value
7474
}
7575
}
7676

0 commit comments

Comments
 (0)