I noticed an indentation inconsistency in the Mercury editor when formatting a property whose setter has an explicit access modifier.
For example:
Public Class RectPane
Inherits MermaidPane
Private _fWidth As Double
Private _fHeight As Double
Public Property Width As Double
Get
Return _fWidth
End Get
Private Set(val As Double)
_fWidth = val
End Set
End Property
Public Property Height As Double
Get
Return _fHeight
End Get
Private Set(val As Double)
_fHeight = val
End Set
End Property
End Class
As shown in the attached screenshots, the editor indents Private Set(...) differently from Get.
If I remove the Private modifier and write only:
Set(val As Double)
the getter and setter are indented consistently.
Actual behavior
A setter with an explicit access modifier, such as Private Set, is placed at a different indentation level from the corresponding Get block.
Expected behavior
Get and Private Set should be aligned at the same indentation level, because both are accessors of the same property.
For example:
Public Property Width As Double
Get
Return _fWidth
End Get
Private Set(val As Double)
_fWidth = val
End Set
End Property
This does not appear to affect compilation, but it makes property formatting visually inconsistent. It would be useful if the editor’s automatic indentation treated access-modified setters in the same way as ordinary setters.
