Skip to content

Commit 31dac3a

Browse files
committed
Adapt new runnable/test21241.d for LDC
1 parent fd4b0ca commit 31dac3a

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
REQUIRED_ARGS: runnable/imports/imp21241a.c runnable/imports/imp21241b.c
3+
*/
4+
// https://github.com/dlang/dmd/issues/21241
5+
6+
/* LDC: no 'fix' for LDC (moved from runnable/ to fail_compilation/); make sure a warning is emitted instead
7+
see https://github.com/ldc-developers/ldc/pull/4949#issuecomment-2972894481
8+
REQUIRED_ARGS: -w
9+
TEST_OUTPUT:
10+
---
11+
runnable/imports/imp21241a.c(3): Warning: skipping definition of function `imp21241a.foo` due to previous definition for the same mangled name: foo
12+
---
13+
*/
14+
15+
import imp21241a;
16+
import imp21241b;
17+
18+
void main(){
19+
int x = getA();
20+
assert(x==aValue);
21+
x = getB();
22+
assert(x==bValue);
23+
}

tests/dmd/runnable/test21241.d

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)