Last active
August 29, 2015 14:00
Revisions
-
Russell revised this gist
May 1, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,13 @@ def inlineMeAgain[T](f: => T): T = { f } def inlineme(f: => Int): Int = { try { inlineMeAgain { return f } } catch { case ex: Throwable => 5 } } -
Russell created this gist
Apr 28, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ def inlineme(f: => Int): Int = { try { inlineMeAgain { return f } } catch safelyCatchThrowable { case ex: Throwable => 5 } } def doStuff { val res = inlineme { 10 } println("we got: " + res + ". should be 10") } doStuff