oops: forgot to add them
[mono.git] / mcs / btests / LabelD.vb
1 ' Positive Test
2 ' Test labels in functions
3 ''''''''''''''''''''''''''''''''''
4 ' vbc output
5 ''''''''''''''''''''''''''''''''''
6 ' Should be
7 'Error BC30451: Name 'y' is not declared
8 'Error BC30451: Name 'z' is not declared
9 ''''''''''''''''''''''''''''''''''''''''
10 ' mbas output
11 ''''''''''''''''''''''''''''''''''''''''''
12 ' syntax error, got token `IDENTIFIER', expecting EOL COLON
13 'flabel.vb(21,0) error BC29999: Line:     21 Col: 0
14 'VirtLine: 21 Token: 471
15 'Parsing error in flabel.vb
16 'Mono.MonoBASIC.yyParser.yyException: irrecoverable syntax error
17 'in <0x0081e> Mono.MonoBASIC.Parser:yyparse (Mono.MonoBASIC.yyParser.yyInput)
18 'in <0x002b0> Mono.MonoBASIC.Parser:parse ()
19 ''''''''''''''''''''''''''''''''''''''''''''''
20 Imports System
21
22 Module labelD
23
24
25
26     Function Abs1() As Integer
27
28         Dim x As Integer
29         x = 1
30         If x >= 0 Then
31             GoTo x
32         End If
33
34         x = -x
35
36 x:
37 y:
38 z:
39         Return x
40
41     End Function
42
43     Sub Main()
44         Dim x As Integer, y As Integer
45
46         x = Abs1()
47         y = Abs1()
48
49         If x <> 1 Then
50             Throw New Exception("#Lbl3")
51         End If
52         If y <> 1 Then
53             Throw New Exception("#Lbl4")
54         End If
55     End Sub
56
57
58 End Module