[Issue 8907] New: Selective import of a symbol after its first usage causes errors (including ICE)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 29 06:14:57 PDT 2012


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

           Summary: Selective import of a symbol after its first usage
                    causes errors (including ICE)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-10-29 16:14:56 MSK ---
---
import core.stdc.config;

void f(c_ulong) { }

import core.stdc.config: c_ulong;

void main()
{
    f(3); // line 9
}
---

Compiler output:
---
main.d(9): Error: function main.f (c_ulong _param_0) is not callable using
argument types (int)
main.d(9): Error: forward reference to type c_ulong
main.d(9): Error: cannot implicitly convert expression (3) of type int to
c_ulong
---



---
import core.stdc.config;

c_ulong a;

import core.stdc.config: c_ulong;

void main()
{
    a = 3;
}
---

Compiler output:
---
Assertion failure: 'fd && fd->inferRetType' on line 81 in file 'mangle.c'
---

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


More information about the Digitalmars-d-bugs mailing list