C#: Fix toString for capture definitions.

This commit is contained in:
Anders Schack-Mulligen
2026-05-01 10:26:50 +02:00
parent 5fbba0e9fe
commit 439a67a3fe

View File

@@ -569,6 +569,15 @@ module Ssa {
override string toString() { result = SsaImpl::ParameterDefinitionImpl.super.toString() }
}
/** An SSA definition in a closure that captures a variable. */
class SsaCapturedDefinition extends SsaImplicitEntryDefinition {
SsaCapturedDefinition() {
this.getSourceVariable().getAssignable() instanceof LocalScopeVariable
}
override string toString() { result = "SSA capture def(" + this.getSourceVariable() + ")" }
}
/**
* An SSA definition representing the potential definition of a variable
* via a call.