Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1106 from 9rnsr/fix8629
Issue 8629 - UFCS resolution prints fake error
- Loading branch information
Showing
2 changed files
with
24 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// REQUIRED_ARGS: -property | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag8629.d(9): Error: not a property s.gunc | ||
--- | ||
*/ | ||
|
||
#line 1 | ||
struct S {} | ||
|
||
auto gunc(S s, int n) { return 13; } | ||
@property grop(S s, int n) { return 14; } | ||
|
||
void main() | ||
{ | ||
S s; | ||
assert((s.gunc = 1) == 13); // line 9 | ||
assert((s.grop = 1) == 14); // line 10 | ||
} |