http://d.puremagic.com/issues/show_bug.cgi?id=2962


d...@dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |d...@dawgfoto.de


--- Comment #36 from d...@dawgfoto.de 2012-03-22 11:11:55 PDT ---
cat > a.d << CODE
import b;
alias foo!() fooi;
CODE

cat > b.d << CODE
void foo()(int p)
{
    int inner()() { return p; }
    alias inner!() finner;
}
CODE

dmd -c b a

--------

Slightly more reduced test case.

There are two things that should get fixed.

- We push template instances into the wrong object/module.
  The module a template instance is attached to is found
  by following the importedFrom chain. The head of the chain
  should be the template declaration module not the instantiation
  module. By doing so we guarantee that all instances remain
  ordered and are bundled with their dependencies.

- VarDeclaration::toSymbol creates csym lazily.
  I don't see any reason why this shouldn't apply to
  parameters as well, e.g. replacing the 'p' parameter
  with a local variable fixes the bug. So we should
  just call v->toSymbol() and remove the assertion.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to