I think this could be a bug. I searched the bug reports and can't find anything.
Here is an example:
Code: Select all
Type parent
As Integer x1, y1, x2, y2
End Type
Type child Extends parent
Declare Sub foo()
End Type
Sub child.foo()
with This
Dim As Integer x1, y1, x2, y2
Dim as integer zx1
'x1 = .x1 ' error: element not defined
'x1 = this.x1 ' error: element not defined
zx1 = .x1 ' this will error as well unless you comment out the first dim as line
end With
End Sub