-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Backports #17366
- Loading branch information
Showing
8 changed files
with
100 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
object A { | ||
object B { | ||
def a = 2 | ||
} | ||
} | ||
|
||
def m1 = { | ||
def b = { | ||
def c = 2 | ||
} | ||
} | ||
|
||
def m2 = | ||
if true then { | ||
val x = 3 | ||
if (false) | ||
x | ||
else { | ||
val y = 4 | ||
y | ||
} | ||
} | ||
|
||
def m3 = | ||
try { | ||
val n2 = 21 | ||
val n1 = 4 | ||
n2 / n1 | ||
} | ||
catch { | ||
case _ => 4 | ||
} | ||
|
||
def m4 = { | ||
val n2 = 21 | ||
try { | ||
val n1 = 4 | ||
n2 / n1 | ||
} | ||
catch { | ||
case _ => 4 | ||
} | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
object A: | ||
object B: | ||
def a = 2 | ||
|
||
def m1 = | ||
def b = | ||
def c = 2 | ||
|
||
def m2 = | ||
if true then | ||
val x = 3 | ||
if (false) | ||
x | ||
else | ||
val y = 4 | ||
y | ||
|
||
def m3 = | ||
try | ||
val n2 = 21 | ||
val n1 = 4 | ||
n2 / n1 | ||
catch | ||
case _ => 4 | ||
|
||
def m4 = | ||
val n2 = 21 | ||
try | ||
val n1 = 4 | ||
n2 / n1 | ||
catch | ||
case _ => 4 |