Skip to content

Commit

Permalink
Update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel committed Nov 21, 2024
1 parent 3706959 commit 7d4d2b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
16 changes: 4 additions & 12 deletions compiler/test/runnable/imports/test23722b.d
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
struct A {
import core.stdc.stdio;
alias x = () {
printf("x\n");
};
alias y = () {
printf("y\n");
};
auto f(string s, alias g)() {
return true;
}

// do_x should call A.x (and print "x")
void do_x() {
A.x();
}
alias a = f!("a", output => output);
alias b = f!("b", output => true);
10 changes: 3 additions & 7 deletions compiler/test/runnable/test23722.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
// Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code
import imports.test23722b;

// do_y should call A.y (and print "y")
void do_y() {
A.y();
bool f() {
return b;
}

extern (C) void main() {
do_y(); // should print y
do_x(); // should print x
}
void main() {}

0 comments on commit 7d4d2b9

Please sign in to comment.