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 #4399 from 9rnsr/fix14163
Issue 14163 - No line number for error with disabled class constructor
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
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,19 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag14163.d(16): Error: constructor diag14163.Bar.this cannot call super() implicitly because it is annotated with @disable | ||
--- | ||
*/ | ||
|
||
class Foo | ||
{ | ||
@disable this(); | ||
} | ||
|
||
class Bar : Foo | ||
{ | ||
@disable this(); | ||
this(int i) {} | ||
} | ||
|
||
void main() {} |