File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,13 @@ public LambdaExpression(
26
26
[ NotNull ] StatementList body ,
27
27
// FEATURE #22
28
28
[ CanBeNull ] IList < VariableDeclaration > parameterList = null ,
29
- [ CanBeNull ] Type returnType = null ) : base ( metaData )
29
+ [ CanBeNull ] Type returnType = null ,
30
+ [ CanBeNull ] ReturnLabelDeclaration endLabel = null ) : base ( metaData )
30
31
{
31
32
Body = body ;
32
33
DeclaredType = returnType ;
33
34
ParameterList = parameterList ?? new List < VariableDeclaration > ( 0 ) ;
34
- EndLabel = new ReturnLabelDeclaration ( MetaData , "" ) ;
35
+ EndLabel = endLabel ?? new ReturnLabelDeclaration ( MetaData , "" ) ;
35
36
}
36
37
37
38
public override void SurroundWith ( Environment environment )
Original file line number Diff line number Diff line change @@ -117,9 +117,11 @@ public static VariableDeclaration IdDeclaration() =>
117
117
new List < Expression > ( new [ ]
118
118
{
119
119
new VariableExpression ( MetaData . Empty , "a" )
120
- } ) ) )
120
+ } ) ) ,
121
+ "inner" )
121
122
) , returnType :
122
- new UnknownType ( MetaData . Empty , "i8" ) ) ,
123
+ new UnknownType ( MetaData . Empty , "i8" ) ,
124
+ endLabel : new ReturnLabelDeclaration ( MetaData . Empty , "inner" ) ) ,
123
125
new List < Expression > ( ) ) ) ) ,
124
126
new List < VariableDeclaration > ( new [ ]
125
127
{
@@ -199,6 +201,7 @@ public void FuncCallTest5()
199
201
var example = FuncCallAst5 ( ) ;
200
202
example . SurroundWith ( Environment . SolarSystem ) ;
201
203
example . PrintDumpInfo ( ) ;
204
+ Errors . PrintErrorInfo ( ) ;
202
205
Assert . IsTrue ( 0 == Errors . ErrList . Count ) ;
203
206
}
204
207
@@ -209,6 +212,7 @@ public void FuncCallTest5KeelAll()
209
212
var example = FuncCallAst5 ( ) ;
210
213
example . SurroundWith ( Environment . SolarSystem ) ;
211
214
example . PrintDumpInfo ( ) ;
215
+ Errors . PrintErrorInfo ( ) ;
212
216
Assert . IsTrue ( 0 == Errors . ErrList . Count ) ;
213
217
}
214
218
You can’t perform that action at this time.
0 commit comments