Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 11545 - Aggregate function literal member should not have a…
…ccess to enclosing scope
- Loading branch information
Showing
7 changed files
with
97 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail11545.d(14): Error: need 'this' for 'x' of type 'int' | ||
fail_compilation/fail11545.d(18): Error: need 'this' for 'x' of type 'int' | ||
--- | ||
*/ | ||
|
||
class C | ||
{ | ||
int x = 42; | ||
|
||
int function() f1 = function() { | ||
return x; | ||
}; | ||
|
||
int function() f2 = { | ||
return x; | ||
}; | ||
} |
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
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
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