public behaviour lazy<Value>: Value {
private var storage: Value?
// Only `init()` allowed for now
init() {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func f() throws Error1 { return 42 } | |
func g(meaning: Int) throws Error2 { print(meaning) } | |
func test() { | |
do { | |
try g(try f()) | |
} catch let err1 as Error1 { | |
print("Error1") | |
} catch let err2 as Error2 { | |
print("Error2") |
function-type → (
function-type-parametersopt )
throws-annotationopt ->
type
function-type-parameters → function-type-parameter ,
function-type-parameters
function-type-parameters → function-type-parameter ...
opt
function-type-parameter → attributesopt inout
opt type
throws-annotation → throws | rethrows
- Proposal: SE-NNNN
- Author: Adrian Zubarev, Anton Zhilin
- Status: Awaiting review
- Review manager: TBD
- Replace
T.self
notation withT.metatype
andT.Type
withMetatype<T>
- Proposal: SE-NNNN
- Author: Anton Zhilin
- Status: Awaiting review
- Review manager: TBD
- Rename metatypes
T.Type
toMetatype
- Proposal: SE-NNNN
- Author: Adrian Zubarev, Anton Zhilin
- Status: Awaiting review
- Review manager: TBD
This proposal want to revise metatypes T.Type
, repurpose public T.self
notation to return a new Type
type instance rather than a metatype, merge SE-0101 into Type
, rename the global function from SE-0096 to match the changes of this proposal and finally rename current Mirror
type to introduce a new (lazy) Mirror
type.
- Proposal: SE-0126
- Authors: Adrian Zubarev, Anton Zhilin
- Status: Revision
- Review manager: Chris Lattner
- Revision: 2
- Previous Revisions: 1
- Proposal: SE-0126
- Authors: Adrian Zubarev, Anton Zhilin
- Status: Revision
- Review manager: Chris Lattner
- Revision: 2
- Previous Revisions: 1
/────────────────────── Domain 1
/
/ /───────────── Domain 2
/ /
─────────────────────────────────────────────────────── Core operators
\
\──────────────────────────── Domain 3
\
\──────────────── Domain 4
- Proposal: SE-NNNN
- Authors: Anton Zhilin
- Review Manager: TBD
- Status: Awaiting review
Change syntax of pattern-matching versions of if
and guard
.
OlderNewer