Bug 16967 – No switch case fallthrough warnings in in/out contracts

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-12-12T15:41:00Z
Last change time
2017-01-16T23:25:48Z
Assigned to
nobody
Creator
benpnz

Comments

Comment #0 by benpnz — 2016-12-12T15:41:34Z
Switch case fallthrough warnings are not generated for code in in/out contracts. ----- import std.stdio; void main() { auto str = "test"; void testFunc ( ) in { switch (str) { case "test": writeln("test"); // Does not generate a warning default: break; } } body { switch (str) { case "test": writeln("test"); // Generates a warning default: break; } } testFunc(); } -----
Comment #1 by bitter.taste — 2016-12-20T19:57:54Z
Comment #2 by github-bugzilla — 2016-12-21T22:21:09Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b15db024d8667919581df7b7a0ab3eca806054f1 Fix issue #16967 - Show fallthrough warnings for in/out bodies. https://github.com/dlang/dmd/commit/cb7f8fe350d82487fa4e7e3ff1daf2da78d1d373 Merge pull request #6344 from LemonBoy/b16967 Fix issue #16967 - Show fallthrough warnings for in/out bodies.
Comment #3 by github-bugzilla — 2016-12-27T14:41:39Z
Commits pushed to scope at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b15db024d8667919581df7b7a0ab3eca806054f1 Fix issue #16967 - Show fallthrough warnings for in/out bodies. https://github.com/dlang/dmd/commit/cb7f8fe350d82487fa4e7e3ff1daf2da78d1d373 Merge pull request #6344 from LemonBoy/b16967
Comment #4 by github-bugzilla — 2017-01-16T23:25:48Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b15db024d8667919581df7b7a0ab3eca806054f1 Fix issue #16967 - Show fallthrough warnings for in/out bodies. https://github.com/dlang/dmd/commit/cb7f8fe350d82487fa4e7e3ff1daf2da78d1d373 Merge pull request #6344 from LemonBoy/b16967