Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 19734 - isDataseg returns true for non-static declarations
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 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 @@ | ||
// https://issues.dlang.org/show_bug.cgi?id=19734 | ||
// REQUIRED_ARGS: -main | ||
|
||
class C19734 | ||
{ | ||
import core.stdc.stdarg; | ||
|
||
extern | ||
{ | ||
// Invalid 'this' parameter because of applied 'extern' storage class. | ||
void testin(typeof(this) p) | ||
in(this is p) | ||
{ | ||
} | ||
|
||
// Undefined reference to __result. | ||
int testout() | ||
out(; __result == 2) | ||
{ | ||
return 2; | ||
} | ||
|
||
// Undefined reference to var. | ||
int testlocal() | ||
{ | ||
int var; | ||
return var + 2; | ||
} | ||
|
||
// Variable _argptr cannot have initializer. | ||
int testvarargs(...) | ||
{ | ||
return 0; | ||
} | ||
} | ||
} |