(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / LabelD.vb
blob3bc0efc4b3a50853140385108602b357cd6d8ead
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
22 Module labelD
26 Function Abs1() As Integer
28 Dim x As Integer
29 x = 1
30 If x >= 0 Then
31 GoTo x
32 End If
34 x = -x
39 Return x
41 End Function
43 Sub Main()
44 Dim x As Integer, y As Integer
46 x = Abs1()
47 y = Abs1()
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
58 End Module