Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2463 from 9rnsr/fix4481
Issue 4481 - ICE(glue.c,!vthis->csym) or compiles, depending on the import statements order
- Loading branch information
Showing
4 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// EXTRA_SOURCES: imports/b4481.d | ||
import imports.a4481; | ||
import imports.b4481; | ||
|
||
void main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module imports.a4481; | ||
|
||
template reduce(alias pred) | ||
{ | ||
auto reduce(R)(R range) | ||
{ | ||
return pred(range[0]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module imports.b4481; | ||
|
||
import imports.a4481; | ||
|
||
class Font | ||
{ | ||
public: | ||
int charHeight(dchar c) { return 0; } | ||
int textHeight(in string text) | ||
{ | ||
auto maxHeight = (dchar ch) { return charHeight(ch); }; | ||
return reduce!(maxHeight)(text); | ||
} | ||
} |