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 #2071 from 9rnsr/fix10150
[enh][REG2.063a] Issue 10150 - Prefix method 'this' qualifiers should be just ignored anytime
- Loading branch information
Showing
3 changed files
with
70 additions
and
8 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,36 @@ | ||
// REQUIRED_ARGS: -o- | ||
// PERMUTE_ARGS: | ||
|
||
void foo() {} | ||
alias F = typeof(foo); | ||
|
||
class C | ||
{ | ||
const static void fc() {} | ||
immutable static void fi() {} | ||
inout static void fw() {} | ||
shared static void fs() {} | ||
shared const static void fsc() {} | ||
shared inout static void fsw() {} | ||
|
||
static assert(is(typeof(fc) == F)); | ||
static assert(is(typeof(fi) == F)); | ||
static assert(is(typeof(fw) == F)); | ||
static assert(is(typeof(fs) == F)); | ||
static assert(is(typeof(fsc) == F)); | ||
static assert(is(typeof(fsw) == F)); | ||
} | ||
|
||
const { void fc() {} } | ||
immutable { void fi() {} } | ||
inout { void fw() {} } | ||
shared { void fs() {} } | ||
shared const { void fsc() {} } | ||
shared inout { void fsw() {} } | ||
|
||
static assert(is(typeof(fc) == F)); | ||
static assert(is(typeof(fi) == F)); | ||
static assert(is(typeof(fw) == F)); | ||
static assert(is(typeof(fs) == F)); | ||
static assert(is(typeof(fsc) == F)); | ||
static assert(is(typeof(fsw) == F)); |
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