digitalmars.D.bugs - [Issue 6242] New: Disallow inoperant "in" contracts
- d-bugmail puremagic.com (22/22) Jul 02 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6242
- d-bugmail puremagic.com (13/13) Jul 02 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6242
- d-bugmail puremagic.com (13/13) Jul 03 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6242
- d-bugmail puremagic.com (14/14) Jul 04 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6242
- d-bugmail puremagic.com (11/11) Jul 04 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6242
http://d.puremagic.com/issues/show_bug.cgi?id=6242
Summary: Disallow inoperant "in" contracts
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: andrei metalanguage.com
21:21:52 PDT ---
Consider:
class A { void fun(int) {} }
class B : A { void fun(int x) in { assert(x > 0); } body {} }
In this case B's in contract is never called. The compiler should disallow the
code. To make the code work, an empty "in" contract on A.fun should suffice.
The error message should mention that.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6242
yebblies <yebblies gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid, patch
CC| |yebblies gmail.com
Platform|Other |All
OS/Version|Mac OS X |All
https://github.com/D-Programming-Language/dmd/pull/196
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6242
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla digitalmars.com
Resolution| |FIXED
12:05:35 PDT ---
https://github.com/D-Programming-Language/dmd/commit/c8b18c01ca47fbe1b140e368418da50d93205b4d
https://github.com/D-Programming-Language/dmd/commit/a5bc620cd0a6a109273332175d3430f747e675e7
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 03 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6242
kennytm gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |kennytm gmail.com
Resolution|FIXED |
Reopened as currently the code is still accepted. Perhaps pull 207 needs to be
merged first.
https://github.com/D-Programming-Language/dmd/pull/207
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 04 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6242
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
19:16:50 PDT ---
https://github.com/D-Programming-Language/dmd/commit/e52066fbfcaf9cc0879f0665e2b11f23d209494d
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 04 2011









d-bugmail puremagic.com 