Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 13131 - [2.066-b3] dmd: glue.c:1492: unsigned int totym(Typ…
…e*): Assertion `0' failed.
- Loading branch information
Showing
6 changed files
with
70 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
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,20 @@ | ||
// EXTRA_SOURCES: imports/a13131parameters.d imports/a13131elec.d | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
+A | ||
+B | ||
fail_compilation/imports/a13131elec.d(10): Error: template instance elecConnOf!gconn template 'elecConnOf' is not defined | ||
-B | ||
-A | ||
--- | ||
*/ | ||
|
||
void main() | ||
{ | ||
struct Connectivity {} | ||
auto L = Connectivity(); | ||
|
||
import imports.a13131elec; // [1] import | ||
L.initElec; | ||
} |
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,17 @@ | ||
module imports.a13131checkpoint; | ||
|
||
mixin(createGlobalsMixins); // [3] mixin | ||
|
||
auto createGlobalsMixins() // [4] semantic3 | ||
{ | ||
pragma(msg, "+A"); | ||
enum fullModuleName = "imports.a13131parameters"; // necessary | ||
foreach (e ; __traits(derivedMembers, mixin(fullModuleName))) | ||
{ | ||
// [5] see imports.parameters (it's listed in command line) | ||
static if ( __traits(compiles, mixin(`__traits(getAttributes, `~fullModuleName~`.`~e~`)`))) {} | ||
} | ||
pragma(msg, "-A"); | ||
|
||
return ""; | ||
} |
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,10 @@ | ||
module imports.a13131elec; | ||
|
||
import imports.a13131checkpoint; // [2] import | ||
|
||
void initElec(T)(T L) | ||
{ | ||
immutable cv = econn.velocities; // econn is invalid so generates ErrorExp | ||
} | ||
|
||
alias econn = elecConnOf!gconn; // invalid declaration |
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,13 @@ | ||
module imports.a13131parameters; | ||
|
||
auto createParameterMixins() // auto is necessary to invoke semantic3 to calculate full signature | ||
{ | ||
pragma(msg, "+B"); | ||
enum fullModuleName = "imports.a13131elec"; // necessary | ||
foreach (e ; __traits(derivedMembers, mixin(fullModuleName))) | ||
{ | ||
// will access yet-not semantic analyzed invalid symbol 'econn' in imports.elec | ||
static if ( __traits(compiles, mixin(`__traits(getAttributes, `~fullModuleName~`.`~e~`)`))) {} | ||
} | ||
pragma(msg, "-B"); | ||
} |