Skip to content

Commit 2b7479f

Browse files
committed
Add non opt test for inner classes
1 parent d544507 commit 2b7479f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

compiler/test/dotty/tools/dotc/SimplifyTests.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,25 @@ abstract class SimplifyTests(val optimise: Boolean) extends DottyBytecodeTest {
174174
"""
175175
""")
176176

177+
@Test def localDefinitionNoElimination =
178+
check(
179+
"""
180+
|val j = 0 // dummy
181+
|class Foo {
182+
| lazy val foo = 1
183+
| def bar = 2
184+
| val baz = 3
185+
|}
186+
""",
187+
"""
188+
|class Foo {
189+
| lazy val foo = 1
190+
| def bar = 2
191+
| val baz = 3
192+
|}
193+
""")
194+
195+
177196
// @Test def listPatmapExample =
178197
// check(
179198
// """

0 commit comments

Comments
 (0)