Skip to content

Commit

Permalink
Fix 23722 - Lambdas are mangled incorrectly when using multiple compi… (
Browse files Browse the repository at this point in the history
#15343)

* Fix 23722 - Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code

* Update test cases
  • Loading branch information
dkorpel authored Nov 27, 2024
1 parent 4c645bb commit a3abf11
Show file tree
Hide file tree
Showing 44 changed files with 102 additions and 84 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dmd/expressionsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -5548,7 +5548,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
{
if (exp.fd.ident == Id.empty)
{
const(char)[] s;
string s;
if (exp.fd.fes)
s = "__foreachbody";
else if (exp.fd.tok == TOK.reserved)
Expand Down Expand Up @@ -5582,7 +5582,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
symtab = sds.symtab;
}
assert(symtab);
Identifier id = Identifier.generateId(s, symtab.length() + 1);
Identifier id = Identifier.generateIdWithLoc(s, exp.loc);
exp.fd.ident = id;
if (exp.td)
exp.td.ident = id;
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/b19523.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TEST_OUTPUT:
----
fail_compilation/b19523.d(13): Error: undefined identifier `SomeStruct`
fail_compilation/b19523.d(14): Error: function `foo` is not callable using argument types `(_error_)`
fail_compilation/b19523.d(14): cannot pass argument `__lambda2` of type `_error_` to parameter `int delegate() arg`
fail_compilation/b19523.d(14): cannot pass argument `__lambda_L14_C6` of type `_error_` to parameter `int delegate() arg`
fail_compilation/b19523.d(19): `b19523.foo(int delegate() arg)` declared here
----
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/bug9631.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TEST_OUTPUT:
fail_compilation/bug9631.d(80): Error: function `f` is not callable using argument types `(int, S)`
fail_compilation/bug9631.d(80): cannot pass argument `y` of type `bug9631.tem!().S` to parameter `bug9631.S s`
fail_compilation/bug9631.d(79): `bug9631.arg.f(int i, S s)` declared here
fail_compilation/bug9631.d(81): Error: function literal `__lambda4(S s)` is not callable using argument types `(S)`
fail_compilation/bug9631.d(81): Error: function literal `__lambda_L81_C5(S s)` is not callable using argument types `(S)`
fail_compilation/bug9631.d(81): cannot pass argument `x` of type `bug9631.S` to parameter `bug9631.tem!().S s`
fail_compilation/bug9631.d(87): Error: constructor `bug9631.arg.A.this(S __param_0)` is not callable using argument types `(S)`
fail_compilation/bug9631.d(87): cannot pass argument `S(0)` of type `bug9631.tem!().S` to parameter `bug9631.S __param_0`
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/constraints_defs.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TEST_OUTPUT:
fail_compilation/constraints_defs.d(49): Error: template instance `constraints_defs.main.def!(int, 0, (a) => a)` does not match template declaration `def(T, int i = 5, alias R)()`
with `T = int,
i = 0,
R = __lambda1`
R = __lambda_L49_C18`
must satisfy the following constraint:
` N!T`
fail_compilation/constraints_defs.d(50): Error: template instance `imports.constraints.defa!int` does not match template declaration `defa(T, U = int)()`
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/constraints_tmpl.d
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fail_compilation/constraints_tmpl.d(41): Error: template instance `imports.const
` N!T
N!U`
fail_compilation/constraints_tmpl.d(43): Error: template instance `constraints_tmpl.main.lambda!((a) => a)` does not match template declaration `lambda(alias pred)()`
with `pred = __lambda1`
with `pred = __lambda_L43_C13`
must satisfy the following constraint:
` N!int`
---
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/cppvar.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fail_compilation/cppvar.d(21): Error: variable `cppvar.staticVar` cannot have `e
fail_compilation/cppvar.d(21): perhaps declare it as `__gshared` instead
fail_compilation/cppvar.d(22): Error: variable `cppvar.sharedVar` cannot have `extern(C++)` linkage because it is `shared`
fail_compilation/cppvar.d(22): perhaps declare it as `__gshared` instead
fail_compilation/cppvar.d(30): Error: delegate `cppvar.__lambda7` cannot return type `bool[3]` because its linkage is `extern(C++)`
fail_compilation/cppvar.d(30): Error: delegate `cppvar.__lambda_L30_C46` cannot return type `bool[3]` because its linkage is `extern(C++)`
---
*/
#line 10
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/diag12829.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TEST_OUTPUT:
---
fail_compilation/diag12829.d(15): Error: function `diag12829.test1` is `@nogc` yet allocates closure for `test1()` with the GC
fail_compilation/diag12829.d(18): delegate `diag12829.test1.__lambda2` closes over variable `x`
fail_compilation/diag12829.d(18): delegate `diag12829.test1.__lambda_L18_C33` closes over variable `x`
fail_compilation/diag12829.d(17): `x` declared here
fail_compilation/diag12829.d(22): function `diag12829.test1.bar` closes over variable `x`
fail_compilation/diag12829.d(17): `x` declared here
Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/diag15411.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/diag15411.d(17): Error: function `diag15411.test15411.__funcliteral2` cannot access variable `i` in frame of function `diag15411.test15411`
fail_compilation/diag15411.d(17): Error: function `diag15411.test15411.__funcliteral_L17_C15` cannot access variable `i` in frame of function `diag15411.test15411`
fail_compilation/diag15411.d(16): `i` declared here
fail_compilation/diag15411.d(18): Error: function `diag15411.test15411.__funcliteral4` cannot access variable `i` in frame of function `diag15411.test15411`
fail_compilation/diag15411.d(18): Error: function `diag15411.test15411.__funcliteral_L18_C15` cannot access variable `i` in frame of function `diag15411.test15411`
fail_compilation/diag15411.d(16): `i` declared here
fail_compilation/diag15411.d(26): Error: `static` function `diag15411.testNestedFunction.myFunc2` cannot access function `myFunc1` in frame of function `diag15411.testNestedFunction`
fail_compilation/diag15411.d(25): `myFunc1` declared here
Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/diag20268.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/*
TEST_OUTPUT:
---
fail_compilation/diag20268.d(12): Error: template `__lambda4` is not callable using argument types `!()(int)`
fail_compilation/diag20268.d(11): Candidate is: `__lambda4(__T1, __T2)(x, y)`
fail_compilation/diag20268.d(12): Error: template `__lambda_L11_C1` is not callable using argument types `!()(int)`
fail_compilation/diag20268.d(11): Candidate is: `__lambda_L11_C1(__T1, __T2)(x, y)`
---
*/

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/diag9831.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/diag9831.d(13): Error: function `diag9831.main.__lambda3(__T1)(x)` cannot access variable `c` in frame of function `D main`
fail_compilation/diag9831.d(13): Error: function `diag9831.main.__lambda_L13_C12(__T1)(x)` cannot access variable `c` in frame of function `D main`
fail_compilation/diag9831.d(11): `c` declared here
---
*/
Expand Down
14 changes: 7 additions & 7 deletions compiler/test/fail_compilation/diag_funclit.d
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
TEST_OUTPUT:
---
fail_compilation/diag_funclit.d(103): Error: function literal `__lambda1(x, y, z)` is not callable using argument types `()`
fail_compilation/diag_funclit.d(103): Error: function literal `__lambda_L103_C5(x, y, z)` is not callable using argument types `()`
fail_compilation/diag_funclit.d(103): too few arguments, expected 3, got 0
fail_compilation/diag_funclit.d(106): Error: function literal `__lambda2(x, y, z)` is not callable using argument types `(int, string, int, int)`
fail_compilation/diag_funclit.d(106): Error: function literal `__lambda_L106_C5(x, y, z)` is not callable using argument types `(int, string, int, int)`
fail_compilation/diag_funclit.d(106): too many arguments, expected 3, got 4
fail_compilation/diag_funclit.d(108): Error: function literal `__lambda3(x, y, string z = "Hello")` is not callable using argument types `(int, int, string, string)`
fail_compilation/diag_funclit.d(108): Error: function literal `__lambda_L108_C5(x, y, string z = "Hello")` is not callable using argument types `(int, int, string, string)`
fail_compilation/diag_funclit.d(108): too many arguments, expected 3, got 4
fail_compilation/diag_funclit.d(110): Error: function literal `__lambda4(x, y, string z = "Hello")` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(110): Error: function literal `__lambda_L110_C5(x, y, string z = "Hello")` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(110): too few arguments, expected 3, got 1
fail_compilation/diag_funclit.d(112): Error: function literal `__lambda5(x, y, z)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(112): Error: function literal `__lambda_L112_C5(x, y, z)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(112): too few arguments, expected 3, got 1
fail_compilation/diag_funclit.d(115): Error: function literal `__lambda6(x, y, ...)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(115): Error: function literal `__lambda_L115_C5(x, y, ...)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(115): too few arguments, expected 2, got 1
fail_compilation/diag_funclit.d(117): Error: function literal `__lambda7(x, y, string z = "Hey", ...)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(117): Error: function literal `__lambda_L117_C5(x, y, string z = "Hey", ...)` is not callable using argument types `(int)`
fail_compilation/diag_funclit.d(117): too few arguments, expected 3, got 1
---
*/
Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/fail11125.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
TEST_OUTPUT:
---
fail_compilation/fail11125.d(26): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)`
with `predfun = __lambda1`
with `predfun = __lambda_L26_C13`
must satisfy the following constraint:
` is(ReturnType!predfun == bool)`
fail_compilation/fail11125.d(27): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)`
with `predfun = __lambda2`
with `predfun = __lambda_L27_C17`
must satisfy the following constraint:
` is(ReturnType!predfun == bool)`
---
Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/fail12236.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ fail_compilation/fail12236.d(16): while evaluating `pragma(msg, f1.mangle
fail_compilation/fail12236.d(21): Error: forward reference to inferred return type of function `f2`
fail_compilation/fail12236.d(21): while evaluating `pragma(msg, f2(T)(T).mangleof)`
fail_compilation/fail12236.d(27): Error: template instance `fail12236.f2!int` error instantiating
fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function `__lambda1`
fail_compilation/fail12236.d(31): while evaluating `pragma(msg, __lambda1(__T1)(a).mangleof)`
fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function `__lambda_L29_C5`
fail_compilation/fail12236.d(31): while evaluating `pragma(msg, __lambda_L29_C5(__T1)(a).mangleof)`
---
*/

Expand Down
6 changes: 3 additions & 3 deletions compiler/test/fail_compilation/fail12378.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fail_compilation/fail12378.d(18): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(18): Error: undefined identifier `GOES`
fail_compilation/fail12378.d(91): instantiated from here: `MapResultS!((x0) => ANYTHING - GOES, Result)`
fail_compilation/fail12378.d(17): instantiated from here: `mapS!(Result)`
fail_compilation/fail12378.d(100): instantiated from here: `__lambda1!int`
fail_compilation/fail12378.d(100): instantiated from here: `__lambda_L16_C19!int`
fail_compilation/fail12378.d(91): instantiated from here: `MapResultS!((y0) => iota(2).mapS!((x0) => ANYTHING - GOES), Result)`
fail_compilation/fail12378.d(16): instantiated from here: `mapS!(Result)`
---
Expand All @@ -27,7 +27,7 @@ fail_compilation/fail12378.d(40): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(40): Error: undefined identifier `GOES`
fail_compilation/fail12378.d(112): instantiated from here: `MapResultC!((x0) => ANYTHING - GOES, Result)`
fail_compilation/fail12378.d(39): instantiated from here: `mapC!(Result)`
fail_compilation/fail12378.d(123): instantiated from here: `__lambda1!int`
fail_compilation/fail12378.d(123): instantiated from here: `__lambda_L38_C19!int`
fail_compilation/fail12378.d(112): instantiated from here: `MapResultC!((y0) => iota(2).mapC!((x0) => ANYTHING - GOES), Result)`
fail_compilation/fail12378.d(38): instantiated from here: `mapC!(Result)`
---
Expand All @@ -49,7 +49,7 @@ fail_compilation/fail12378.d(64): Error: undefined identifier `ANYTHING`
fail_compilation/fail12378.d(64): Error: undefined identifier `GOES`
fail_compilation/fail12378.d(135): instantiated from here: `MapResultI!((x0) => ANYTHING - GOES, Result)`
fail_compilation/fail12378.d(63): instantiated from here: `mapI!(Result)`
fail_compilation/fail12378.d(143): instantiated from here: `__lambda1!int`
fail_compilation/fail12378.d(143): instantiated from here: `__lambda_L62_C19!int`
fail_compilation/fail12378.d(135): instantiated from here: `MapResultI!((y0) => iota(2).mapI!((x0) => ANYTHING - GOES), Result)`
fail_compilation/fail12378.d(62): instantiated from here: `mapI!(Result)`
---
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail12908.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail12908.d(14): Error: `pure` delegate `fail12908.main.__foreachbody1` cannot call impure function `fail12908.g`
fail_compilation/fail12908.d(14): Error: `pure` delegate `fail12908.main.__foreachbody_L12_C5` cannot call impure function `fail12908.g`
---
*/

Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/fail13120.d
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail13120.d(13): Error: `pure` delegate `fail13120.g1.__foreachbody2` cannot call impure function `fail13120.f1`
fail_compilation/fail13120.d(13): Error: `@nogc` delegate `fail13120.g1.__foreachbody2` cannot call non-@nogc function `fail13120.f1`
fail_compilation/fail13120.d(13): Error: `pure` delegate `fail13120.g1.__foreachbody_L12_C5` cannot call impure function `fail13120.f1`
fail_compilation/fail13120.d(13): Error: `@nogc` delegate `fail13120.g1.__foreachbody_L12_C5` cannot call non-@nogc function `fail13120.f1`
---
*/
void f1() {}
Expand Down
6 changes: 3 additions & 3 deletions compiler/test/fail_compilation/fail13424.d
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail13424.d(12): Error: delegate `fail13424.S.__lambda2` cannot be struct members
fail_compilation/fail13424.d(17): Error: delegate `fail13424.U.__lambda2` cannot be union members
fail_compilation/fail13424.d(22): Error: delegate `fail13424.C.__lambda2` cannot be class members
fail_compilation/fail13424.d(12): Error: delegate `fail13424.S.__lambda_L12_C35` cannot be struct members
fail_compilation/fail13424.d(17): Error: delegate `fail13424.U.__lambda_L17_C35` cannot be union members
fail_compilation/fail13424.d(22): Error: delegate `fail13424.C.__lambda_L22_C35` cannot be class members
---
*/

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail17969.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* TEST_OUTPUT:
---
fail_compilation/fail17969.d(10): Error: no property `sum` for type `fail17969.__lambda6!(int[]).__lambda6.MapResult2!((b) => b)`
fail_compilation/fail17969.d(10): Error: no property `sum` for type `fail17969.__lambda_L10_C1!(int[]).__lambda_L10_C1.MapResult2!((b) => b)`
fail_compilation/fail17969.d(16): struct `MapResult2` defined here
---
* https://issues.dlang.org/show_bug.cgi?id=17969
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail39.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail39.d(12): Error: function `fail39.main.__funcliteral2` cannot access function `foo` in frame of function `D main`
fail_compilation/fail39.d(12): Error: function `fail39.main.__funcliteral_L12_C27` cannot access function `foo` in frame of function `D main`
fail_compilation/fail39.d(11): `foo` declared here
---
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/iasm1.d
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void test5()

/* TEST_OUTPUT:
---
fail_compilation/iasm1.d(615): Error: delegate `iasm1.test6.__foreachbody1` label `L1` is undefined
fail_compilation/iasm1.d(615): Error: delegate `iasm1.test6.__foreachbody_L611_C5` label `L1` is undefined
---
*/

Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/ice10922.d
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/ice10922.d(11): Error: function `__lambda4` is not callable using argument types `()`
fail_compilation/ice10922.d(11): Error: function `__lambda_L10_C12` is not callable using argument types `()`
fail_compilation/ice10922.d(11): too few arguments, expected 1, got 0
fail_compilation/ice10922.d(10): `ice10922.__lambda4(in uint n)` declared here
fail_compilation/ice10922.d(10): `ice10922.__lambda_L10_C12(in uint n)` declared here
---
*/

Expand Down
4 changes: 2 additions & 2 deletions compiler/test/fail_compilation/ice11822.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
TEST_OUTPUT:
---
fail_compilation/ice11822.d(33): Deprecation: function `ice11822.d` is deprecated
fail_compilation/ice11822.d(16): instantiated from here: `__lambda2!int`
fail_compilation/ice11822.d(22): instantiated from here: `S!(__lambda2)`
fail_compilation/ice11822.d(16): instantiated from here: `__lambda_L33_C15!int`
fail_compilation/ice11822.d(22): instantiated from here: `S!(__lambda_L33_C15)`
fail_compilation/ice11822.d(33): instantiated from here: `g!((n) => d(i))`
---
*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/ice11850.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ EXTRA_FILES: imports/a11850.d
TEST_OUTPUT:
---
fail_compilation/ice11850.d(15): Error: incompatible types for `(a) < ([0])`: `uint[]` and `int[]`
fail_compilation/imports/a11850.d(9): instantiated from here: `FilterResult!(__lambda1, uint[][])`
fail_compilation/imports/a11850.d(9): instantiated from here: `FilterResult!(__lambda_L15_C13, uint[][])`
fail_compilation/ice11850.d(15): instantiated from here: `filter!(uint[][])`
---
*/
Expand Down
6 changes: 3 additions & 3 deletions compiler/test/fail_compilation/ice12235.d
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function `__lambda1`
fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function `__lambda1`
fail_compilation/ice12235.d(15): while evaluating `pragma(msg, __lambda1.mangleof)`
fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function `__lambda_L12_C5`
fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function `__lambda_L12_C5`
fail_compilation/ice12235.d(15): while evaluating `pragma(msg, __lambda_L12_C5.mangleof)`
---
*/

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/ice8309.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/ice8309.d(10): Error: incompatible types for `(__lambda1) : (__lambda2)`: `double function() pure nothrow @nogc @safe` and `int function() pure nothrow @nogc @safe`
fail_compilation/ice8309.d(10): Error: incompatible types for `(__lambda_L10_C15) : (__lambda_L10_C24)`: `double function() pure nothrow @nogc @safe` and `int function() pure nothrow @nogc @safe`
---
*/

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/misc1.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TEST_OUTPUT:
fail_compilation/misc1.d(108): Error: `5` has no effect
fail_compilation/misc1.d(109): Error: `1 + 2` has no effect
fail_compilation/misc1.d(115): Deprecation: `1 * 1` has no effect
fail_compilation/misc1.d(116): Deprecation: `__lambda3` has no effect
fail_compilation/misc1.d(116): Deprecation: `__lambda_L116_C34` has no effect
fail_compilation/misc1.d(122): Deprecation: `false` has no effect
fail_compilation/misc1.d(125): Deprecation: `*sp++` has no effect
fail_compilation/misc1.d(126): Deprecation: `j` has no effect
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/opapplyscope.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* TEST_OUTPUT:
---
fail_compilation/opapplyscope.d(113): Error: function `opapplyscope.S.opApply(scope int delegate(scope int* ptr) @safe dg)` is not callable using argument types `(int delegate(int* x) nothrow @nogc @safe)`
fail_compilation/opapplyscope.d(113): cannot pass argument `__foreachbody3` of type `int delegate(int* x) nothrow @nogc @safe` to parameter `scope int delegate(scope int* ptr) @safe dg`
fail_compilation/opapplyscope.d(113): cannot pass argument `__foreachbody_L113_C5` of type `int delegate(int* x) nothrow @nogc @safe` to parameter `scope int delegate(scope int* ptr) @safe dg`
---
*/

Expand Down
Loading

0 comments on commit a3abf11

Please sign in to comment.