Bug 9414 – Incorrect modification inside contracts is not detected on virtual function
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-27T23:50:00Z
Last change time
2013-04-03T01:31:39Z
Keywords
accepts-invalid, pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-01-27T23:50:06Z
This code should be compile error, but doesn't.
class C
{
int foo(int x) // or 'final'
in
{
x = 10; // L6
}
out(r)
{
x = 10; // L10
}
body
{
return 1;
}
}