diff --git a/TestSuite/BasicInterpreterTests/Blocks.som b/TestSuite/BasicInterpreterTests/Blocks.som index 5c4b18cd..dc91a413 100644 --- a/TestSuite/BasicInterpreterTests/Blocks.som +++ b/TestSuite/BasicInterpreterTests/Blocks.som @@ -40,4 +40,19 @@ Blocks = ( methodLocal := 3. a + methodLocal] value: 5) ) + + testEmptyZeroArg = ( + [] value == nil ifTrue: [ ^ 1 ]. + ^ 2 + ) + + testEmptyOneArg = ( + ([:x | ] value: 4) == nil ifTrue: [ ^ 1 ]. + ^ 2 + ) + + testEmptyTwoArg = ( + ([:x :y | ] value: 4 with: 5) == nil ifTrue: [ ^ 1 ]. + ^ 2 + ) ) diff --git a/TestSuite/BasicInterpreterTests/NumberOfTests.som b/TestSuite/BasicInterpreterTests/NumberOfTests.som index 6d3171d8..d0d53eea 100644 --- a/TestSuite/BasicInterpreterTests/NumberOfTests.som +++ b/TestSuite/BasicInterpreterTests/NumberOfTests.som @@ -26,5 +26,5 @@ NumberOfTests = ( "Return the known number of tests, should be used in basic interpreter test harness to confirm completeness" - numberOfTests = ( ^ 52 ) + numberOfTests = ( ^ 57 ) ) diff --git a/TestSuite/BasicInterpreterTests/Regressions.som b/TestSuite/BasicInterpreterTests/Regressions.som index b57ce31c..8538e828 100644 --- a/TestSuite/BasicInterpreterTests/Regressions.som +++ b/TestSuite/BasicInterpreterTests/Regressions.som @@ -33,4 +33,16 @@ Regressions = ( 'foo:' asSymbol == #foo: ifTrue: [ ^ 1 ]. ^ 2 ) + + testUninitializedLocal = ( + | local | + local == nil ifTrue: [ ^ 1 ]. + ^ 2 + ) + + testUninitializedLocalInBlock = ( + [ | local | + local == nil ifTrue: [ ^ 1 ] ] value. + ^ 2 + ) )