mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
20 lines
265 B
D
20 lines
265 B
D
// REQUIRED_ARGS: -w
|
|
|
|
class F { }
|
|
|
|
int test1() {
|
|
scope F f = new F(); // comment out and warning goes away
|
|
return 0;
|
|
}
|
|
|
|
int test2() { // no return at end of function
|
|
try {
|
|
return 0;
|
|
} finally { }
|
|
}
|
|
|
|
void main()
|
|
{
|
|
test1();
|
|
test2();
|
|
}
|