|
|
@ -58,10 +58,7 @@ namespace ICSharpCode.Decompiler.IL |
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public bool MatchLdLocRef(ILVariable variable) |
|
|
|
public bool MatchLdLocRef(ILVariable variable) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (variable.Type.IsReferenceType == true) |
|
|
|
return MatchLdLocRef(out var v) && v == variable; |
|
|
|
return MatchLdLoc(variable); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return MatchLdLoca(variable); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -75,7 +72,7 @@ namespace ICSharpCode.Decompiler.IL |
|
|
|
return variable.Type.IsReferenceType == true; |
|
|
|
return variable.Type.IsReferenceType == true; |
|
|
|
case LdLoca ldloca: |
|
|
|
case LdLoca ldloca: |
|
|
|
variable = ldloca.Variable; |
|
|
|
variable = ldloca.Variable; |
|
|
|
return variable.Type.IsReferenceType != true; |
|
|
|
return variable.Type.IsReferenceType != true || variable.Type.Kind == TypeKind.TypeParameter; |
|
|
|
default: |
|
|
|
default: |
|
|
|
variable = null; |
|
|
|
variable = null; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|