We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd4b0ca commit 31dac3aCopy full SHA for 31dac3a
tests/dmd/fail_compilation/test21241.d
@@ -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
0 commit comments