@@ -144,7 +144,7 @@ public Declaration(
144
144
_parentScope = parentScope ?? string . Empty ;
145
145
_identifierName = qualifiedName . MemberName ;
146
146
_asTypeName = asTypeName ;
147
- _isSelfAssigned = isSelfAssigned || ( declarationType == DeclarationType . Variable && parentDeclaration != null && parentDeclaration . IdentifierName == ComponentName ) ;
147
+ _isSelfAssigned = isSelfAssigned ;
148
148
_isWithEvents = isWithEvents ;
149
149
_accessibility = accessibility ;
150
150
_declarationType = declarationType ;
@@ -464,7 +464,17 @@ public bool AsTypeIsBaseType
464
464
}
465
465
}
466
466
467
- public Declaration AsTypeDeclaration { get ; internal set ; }
467
+ private Declaration _asTypeDeclaration ;
468
+ public Declaration AsTypeDeclaration
469
+ {
470
+ get { return _asTypeDeclaration ; }
471
+ internal set
472
+ {
473
+ _asTypeDeclaration = value ;
474
+ IsSelfAssigned = _isSelfAssigned || ( DeclarationType == DeclarationType . Variable &&
475
+ AsTypeDeclaration . DeclarationType == DeclarationType . UserDefinedType ) ;
476
+ }
477
+ }
468
478
469
479
private readonly IReadOnlyList < DeclarationType > _neverArray = new [ ]
470
480
{
@@ -495,11 +505,19 @@ public bool IsSelected(QualifiedSelection selection)
495
505
Selection . ContainsFirstCharacter ( selection . Selection ) ;
496
506
}
497
507
498
- private readonly bool _isSelfAssigned ;
508
+ private bool _isSelfAssigned ;
509
+
499
510
/// <summary>
500
511
/// Gets a value indicating whether the declaration is a joined assignment (e.g. "As New xxxxx")
501
512
/// </summary>
502
- public bool IsSelfAssigned { get { return _isSelfAssigned ; } }
513
+ public bool IsSelfAssigned
514
+ {
515
+ get { return _isSelfAssigned ; }
516
+ private set
517
+ {
518
+ _isSelfAssigned = value ;
519
+ }
520
+ }
503
521
504
522
private readonly Accessibility _accessibility ;
505
523
/// <summary>
0 commit comments