Rubberduck icon indicating copy to clipboard operation
Rubberduck copied to clipboard

Inspection for value assignments/implicit default member reads from `New`ed up objects

Open ThunderFrame opened this issue 8 years ago • 1 comments

The following are valid syntax forms:

  Dim y As String
  y = New Application

  If Len(New Application) Then
    Beep
  End If

Both rely on the default property of Application being a valid, implied property read, but both instances discard the reference to the newly created object.

See also #3035

ThunderFrame avatar May 25 '17 02:05 ThunderFrame