August 06, 2013 [dmd-internals] [D-Programming-Language/dmd] f58e9b: fix Issue 10736 - Regression (2.064 git-head): Ins... | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/master Home: https://github.com/D-Programming-Language/dmd Commit: f58e9b20ffb865b4256b4fed917d3e5afc1e914b https://github.com/D-Programming-Language/dmd/commit/f58e9b20ffb865b4256b4fed917d3e5afc1e914b Author: k-hara <k.hara.pg@gmail.com> Date: 2013-08-04 (Sun, 04 Aug 2013) Changed paths: M src/mars.c M src/module.c M src/module.h M src/template.c A test/runnable/imports/test10736a.d A test/runnable/imports/test10736b.d A test/runnable/imports/test10736c.d A test/runnable/test10736.d Log Message: ----------- fix Issue 10736 - Regression (2.064 git-head): Instantiation failure triggered by module import and module order In the reduced test case, `test10736b` instantiates `chunks` template function, then it instantiates `Chunks!(int[])`. The instance object will be inserted to `test10736a` member because it is the first module that importing `test10736c`. But in this time, `test10736a` module's semantic3 is already done, then `Chunks!(int[])` would immediately invoke its semantic3, then `Chunks!(int[]).opSlice` refers *not yet instantiation finished* `chunks` template. To avoid the forward reference problem, we should defer semantic3 of template instances which inserted to module scope. Commit: 314a1cca9ff56775b9e2a9cf81564135be0726b1 https://github.com/D-Programming-Language/dmd/commit/314a1cca9ff56775b9e2a9cf81564135be0726b1 Author: Rainer Schuetze <r.sagitario@gmx.de> Date: 2013-08-06 (Tue, 06 Aug 2013) Changed paths: M src/mars.c M src/module.c M src/module.h M src/template.c A test/runnable/imports/test10736a.d A test/runnable/imports/test10736b.d A test/runnable/imports/test10736c.d A test/runnable/test10736.d Log Message: ----------- Merge pull request #2442 from 9rnsr/fix10736 [REG2.064a] fix Issue 10736 - Regression (2.064 git-head): Instantiation failure triggered by module import and module order Compare: https://github.com/D-Programming-Language/dmd/compare/0e2779a4cce6...314a1cca9ff5 |
Copyright © 1999-2021 by the D Language Foundation