* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / mbas / Test / tests / statements / BlockStatementsA.vb
1 Imports System
2
3 Module BlockStatementsA
4
5     Sub Main()
6         Dim a As Integer = 10
7         If a = 10 Then
8             GoTo a
9         End If
10
11 label:  a = 11
12
13 a:      a = 5
14         If a = 5 Then
15             GoTo 123
16         End If
17
18 123:    a = 7
19         If a = 7 Then
20             GoTo _12ab
21         End If
22
23 _12ab:  a = 8
24         If a = 8 Then
25             GoTo [class]
26         End If
27
28 [class]: a = 0
29         if a<>0
30                 throw new System.Exception("#A1 Block statements not working")
31           end if
32
33         ' label declaration always takes precedence in any ambiguous situation
34
35 f1:     Console.WriteLine("Heh") : a = 1 : f1:
36
37     End Sub
38
39     Function f1() As Boolean
40         Console.WriteLine("Inside function f1()")
41         Return True
42     End Function
43
44 End Module