[Issue 6278] New: 'in' contract inheritance doesn't work with safe code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 9 19:05:38 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6278
Summary: 'in' contract inheritance doesn't work with safe code
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: michel.fortin at michelf.com
--- Comment #0 from Michel Fortin <michel.fortin at michelf.com> 2011-07-09 22:00:30 EDT ---
This code yields an error about catching Throwable in safe code, yet no
throwable are caught (except maybe in compiler-generated code related to
contracts):
@safe:
class A {
int test()
in { assert(0); }
body { return 1; }
}
class B : A {
override int test() // Error: can only catch class objects derived from
Exception in @safe code, not 'object.Throwable'
in { assert(0); }
body { return 1; }
}
--
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