File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1940,17 +1940,17 @@ $(GNAME FunctionLiteralBody2):
1940
1940
1941
1941
-------------
1942
1942
int abc(int delegate(int i));
1943
- int def(int function(int s));
1943
+ int def(uint function(uint s));
1944
1944
1945
1945
void test()
1946
1946
{
1947
1947
int b = 3;
1948
1948
1949
- abc( int (int c) { return 6 + b; } ); // inferred to delegate
1950
- def( uint (uint c) { return c * 2; } ); // inferred to function
1951
- //def( int(int c) { return c * b; } ); // error!
1952
- // Because the FunctionLiteralBody accesses b, then the function literal type
1953
- // is inferred to delegate. But def cannot accept a delegate argument.
1949
+ abc( (int c) { return 6 + b; } ); // inferred as delegate
1950
+ def( (uint c) { return c * 2; } ); // inferred as function
1951
+ //def( (uint c) { return c * b; } ); // error!
1952
+ // Because the FunctionLiteralBody accesses b, the function literal type
1953
+ // is inferred as delegate. But def cannot accept a delegate argument.
1954
1954
}
1955
1955
-------------
1956
1956
You can’t perform that action at this time.
0 commit comments