Migarting the mbas' negative test cases from the old folder to here.
[mono.git] / mcs / mbas / Test / errors / LocalVariablesC1.vb
1 REM LineNo: 12\r
2 REM ExpectedError: BC30616\r
3 REM ErrorMessage: Variable 'a' hides a variable in an enclosing block.\r
4 \r
5 Imports System\r
6 \r
7 Module LocalVariablesC1\r
8 \r
9     Function f1(ByVal a As Integer) As Integer\r
10 \r
11         Dim b As Integer = 10\r
12             For a As Integer = 0 to 10\r
13             Console.WriteLine(a)\r
14         Next\r
15         Return a + b\r
16 \r
17     End Function\r
18 \r
19     Sub Main()\r
20         f1(0)\r
21     End Sub\r
22 \r
23 End Module