Designer crashes using 'with' and redim on property of a class

At save and compile time, this crashes the designer (example in an agent):

(Globals)

Option Public

Option Declare

(Decalrations)

Public Class TESTCrash

Public Tableau As Variant



Sub New		

End Sub

End Class

Sub Initialize

Dim t As New TestCrash

'>>> this sentence works

Redim t.Tableau(10) As Integer



With t

	'>>> this on CRASHES at compile time

	'Redim .Tableau(10) As Integer

End With

End Sub

Test has been made :

  • on Windows vista and xp

  • on Lotus notes Designer 7.02, 7.03, 8.5

Steps to reproduce

  1. Create a new agent

  2. Copy and paste text above

  3. Save : it works

  4. Remove quote in 'Redim .Tableau(10) As Integer : it crashes without any informations

Bypass : don’t use redim on class property with ‘With’…

Subject: Did you try to declare Tableau as an array ?

I’d try to declare Tableau as an array in the first place. You are going to Redim is anyway, so it can’t hurt to give it a size right from the beginning.