We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b03d2a commit 02b684aCopy full SHA for 02b684a
spec/statement.dd
@@ -1983,6 +1983,37 @@ $(CONSOLE
1983
return; nor may it be entered with a goto. A $(D scope(failure))
1984
statement may not exit with a return.
1985
1986
+$(SPEC_RUNNABLE_EXAMPLE_RUN
1987
+--------------
1988
+import std.stdio;
1989
+
1990
+int foo()
1991
+{
1992
+ scope(exit) writeln("Inside foo()");
1993
+ return bar();
1994
+}
1995
1996
+int bar()
1997
1998
+ writeln("Inside bar()");
1999
+ return 0;
2000
2001
2002
+int main()
2003
2004
+ foo();
2005
2006
2007
2008
+)
2009
2010
+ writes:
2011
2012
+$(CONSOLE
2013
+Inside bar()
2014
+Inside foo()
2015
2016
2017
$(H3 $(LNAME2 catching_cpp_class_objects, Catching C++ Class Objects))
2018
2019
$(P
0 commit comments