Copied remotely
[mono.git] / mcs / mbas / Test / errors / LogicalOperatorsC3.vb
1 REM LineNo: 26
2 REM ExpectedError: BC30512
3 REM ErrorMessage: Option Strict On disallows implicit conversions from 'Integer' to 'Boolean'.
4
5 Option Strict On
6 Imports System
7
8 Module LogicalOperatorsC3
9
10     Sub Main()
11         Console.WriteLine(f())
12     End Sub
13
14     Function f1() As Integer
15         Console.WriteLine("Function f1() is called")
16         Return 1
17     End Function
18
19     Function f2() As Boolean
20         Console.WriteLine("Function f2() is called")
21         Return False
22     End Function
23
24     Function f() As Integer
25         Dim a1, a2 As Integer
26         a1 = f1() AndAlso f2()
27         Return 0
28     End Function
29
30 End Module