[Issue 11767] New: doubly mixed-in struct "failed semantic analysis"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 18 15:36:49 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11767

           Summary: doubly mixed-in struct "failed semantic analysis"
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nilsbossung at googlemail.com


--- Comment #0 from Nils <nilsbossung at googlemail.com> 2013-12-18 15:36:46 PST ---
Spin-off of bug 11718, comment 1. The original test case and reduced version
are fixed, so this seems to be another issue.

---
cat > test.d << code
mixin template M()
{
    struct S {}
}
mixin M!();
mixin M!();
alias S T; /* should generate an error about conflicting symbols */
code
echo "2.git:"; /home/nils/d/dmd2.git/dmd2/linux/bin64/dmd -c test.d
echo "2.064.2:"; /home/nils/d/dmd2.064.2/dmd2/linux/bin64/dmd -c test.d
echo "2.063.2:"; /home/nils/d/dmd2.063.2/dmd2/linux/bin64/dmd -c test.d
echo "2.062:"; /home/nils/d/dmd2.062/dmd2/linux/bin64/dmd -c test.d
echo "2.061:"; /home/nils/d/dmd2.061/dmd2/linux/bin64/dmd -c test.d
echo "2.060:"; /home/nils/d/dmd2.060/dmd2/linux/bin64/dmd -c test.d
echo "2.059:"; /home/nils/d/dmd2.059/dmd2/linux/bin64/dmd -c test.d
---
2.git:
test.d(3): Error: struct test.M!().S failed semantic analysis
test.d(6): Error: mixin test.M!() error instantiating
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at
test.d(3)
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at
test.d(3)
2.064.2:
test.d(3): Error: struct test.M!().S failed semantic analysis
test.d(6): Error: mixin test.M!() error instantiating
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at
test.d(3)
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at
test.d(3)
2.063.2:
dmd: struct.c:741: virtual void StructDeclaration::semantic(Scope*): Assertion
`type->ty != Tstruct || ((TypeStruct *)type)->sym == this' failed.
Aborted (core dumped)
2.062:
2.061:
2.060:
2.059:
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at
test.d(3)
---

2.059's behaviour is the correct one, as far as I can tell.

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


More information about the Digitalmars-d-bugs mailing list