File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,13 @@ except when they are shadowed by another variable declaration.
75
75
> ( ` : ` [ _ Type_ ] )<sup >?</sup > ` = ` [ _ Expression_ ] ` else ` [ _ BlockExpression_ ] ` ; `
76
76
77
77
A * ` let else ` statement* introduces a new set of [ variables] , given by a
78
- refutable [ pattern] . The pattern is followed optionally by a type
79
- annotation. When no type annotation is given, the compiler will infer the type,
80
- or signal an error if insufficient type information is available for definite
81
- inference. It is is then followed by an initializer expression as well as a
82
- diverging ` else ` block.
78
+ [ pattern] . The pattern is followed optionally by a type annotation. When no type
79
+ annotation is given, the compiler will infer the type, or signal an error if
80
+ insufficient type information is available for definite inference. It is is
81
+ then followed by an initializer expression as well as a diverging ` else ` block.
82
+ Compared to ` let ` statement patterns which have to be irrefutable, ` let else `
83
+ patterns can be both irrefutable and refutable. However, as it is besides the
84
+ point of, irrefutable patterns in ` let else ` are linted against.
83
85
84
86
Any variables introduced by a variable declaration are visible
85
87
from the point of declaration until the end of the enclosing block scope,
You can’t perform that action at this time.
0 commit comments