#31 VBScript Public Default Function causes error

open
nobody
None
5
2006-04-17
2006-04-17
Bob Stammers
No

Inclusion of a default function in a VBScript class
generates an error "ERROR: Unexpected entry for
finalization 'Public Default Function'"

The offending function is then categorised as "other",
"function".

Error occurs with or without comments.

Option Explicit

Class DEMO_CLASS

Public Default Function SayWhat(ByVal msg)

SayWhat = "SayWhat " & msg

End Function

End Class

Dim obj

Set obj = New DEMO_CLASS
MsgBox obj("Hello Sailor")
Set obj = Nothing

Discussion