[Issue 5253] New: regression, in contracts are not allowed in overriden methods.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 21 18:28:59 PST 2010


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

           Summary: regression, in contracts are not allowed in overriden
                    methods.
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: baryluk at smp.if.uj.edu.pl


--- Comment #0 from Witold Baryluk <baryluk at smp.if.uj.edu.pl> 2010-11-21 18:27:41 PST ---
Minimal test case:

module strange_override_bug;

interface K {
    void f();
}

class A(int m) : K {
    override void f()
    in { }
    body { }
}

class B : A!(2) {
    void f() { }
}

/*
strange_override_bug.d(8): Error: variable strange_override_bug.A!(2).A.f.this
override cannot be applied to variable
strange_override_bug.d(9): Error: function
strange_override_bug.A!(2).A.f.__require override only applies to class member
functions
*/

Compile with "in { }" line commented out!
Compiles also if i remove "override" keyword" (and it do not warn my about
anything).

Was working in 2.049.

-- 
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