Skip to content

Commit 181b342

Browse files
committed
SE-0235: Add Result to the Standard Library
1 parent c77a8f9 commit 181b342

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Source/Errors.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public typealias Error = Exception
2+
3+
public enum Result<Value, Error: Swift.Error> {
4+
case value(Value), error(Error)
5+
}

Source/Swift.Shared.projitems

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<Compile Include="$(MSBuildThisFileDirectory)Array.Java.swift" />
9494
<Compile Include="$(MSBuildThisFileDirectory)Dictionary.Java.swift" />
9595
<Compile Include="$(MSBuildThisFileDirectory)Operators.swift" />
96+
<Compile Include="$(MSBuildThisFileDirectory)Errors.swift" />
9697
</ItemGroup>
9798
<ItemGroup>
9899
<Folder Include="Sequences">

0 commit comments

Comments
 (0)