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 65a7dfa commit 99657dcCopy full SHA for 99657dc
1 file changed
tests/dmd/runnable/pragmainline.d
@@ -43,12 +43,18 @@ auto testAlwaysInline()
43
assert(var == 0);
44
}
45
46
+// LDC: inlining an *indirect* call (of the function pointer returned by `bar()`)
47
+// requires enabled optimizations
48
+version (LDC) version (D_Optimized) version = LDC_Optimized;
49
+
50
void main()
51
{
52
immutable baz = () => 1;
- assert(foo() == bar()());
53
+ version (LDC_Optimized)
54
+ assert(foo() == bar()());
55
assert(foo() == baz());
- assert(bar()() == baz());
56
57
+ assert(bar()() == baz());
58
59
testAlwaysInline();
60
0 commit comments