If-statement parenths - Order of Precedence

It appears that Mercury may have adopted Oxygene’s Order of Precedence. I’m not sure if this is intended or not, but it may trip up some VB.NET developers adopting Mercury for the first time. Code was tested in latest Fire and Water builds - .3093.

Oxygen:

Module Program

  Sub Main(args as String())
    writeLn("The magic happens here.")

    If Not 3 = 2 Then 'should be True
      writeLn("This condition has been met.")
    End If
  End Sub

End Module

Output:

The magic happens here.

Native VB.NET

Imports System

Module Program
    Sub Main(args As String())
        Console.WriteLine("Hello World!")

        If Not 3 = 2 Then
            Console.WriteLine("This condition has been met.")
        End If
    End Sub
End Module

Output:

Hello World!
This condition has been met.

If I provide enclosing parentheses, then the Mercury version parallels the native VB.NET version.

If Not (3 = 2) Then`

I just wanted to bring this up, just in case … :+1:
Thank you for taking a look! :smiling_face_with_sunglasses:

Logged as bugs://E27730.

Hi, thank you for reporting this!