mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
19 lines
429 B
HTML
19 lines
429 B
HTML
<html>
|
|
<body>
|
|
Reports <i>fallthrough</i> in switch statements. While occasionally useful, fallthrough is often unintended, and may lead to surprising bugs.
|
|
<p><b>Example:</b></p>
|
|
<pre>
|
|
<code>
|
|
switch(n) {
|
|
case 1:
|
|
print 1
|
|
case 2: // "case 1" fallthrough to "case 2". Statements from "case 2" will be executed immediately after "case 1".
|
|
print 2
|
|
break
|
|
default:
|
|
print "Default"
|
|
}
|
|
</code>
|
|
</pre>
|
|
</body>
|
|
</html> |