mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
20 lines
478 B
D
20 lines
478 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/attributediagnostic_pure.d(19): Error: `pure` function `D main` cannot call impure function `attributediagnostic_pure.gc`
|
|
fail_compilation/attributediagnostic_pure.d(14): and executing an `asm` statement without `pure` annotation makes it fail to infer `pure`
|
|
---
|
|
*/
|
|
|
|
// Issue 17374 - Improve inferred attribute error message
|
|
// https://issues.dlang.org/show_bug.cgi?id=17374
|
|
|
|
auto gc()
|
|
{
|
|
asm {}
|
|
}
|
|
|
|
void main() pure
|
|
{
|
|
gc();
|
|
}
|