Skip to content

Commit

Permalink
Skip ghost parameters in type parameter downcast
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-aws committed Oct 8, 2024
1 parent cde4a05 commit c3dc53f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/DafnyCore/Backends/GoLang/GoCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ private ConcreteSyntaxTree CreateSubroutine(string name, List<TypeArgumentInstan
for (var i = 0; i < inParams.Count; i++) {
var p = (overriddenInParams ?? inParams)[i];
var instantiatedType = p.Type.Subst(thisContext.ParentFormalTypeParametersToActuals);
if (!instantiatedType.Equals(p.Type)) {
if (!p.IsGhost && !instantiatedType.Equals(p.Type)) {
// var p instantiatedType = p.(instantiatedType)
var pName = IdName(inParams[i]);
DeclareLocalVar(pName, instantiatedType, p.tok, true, null, w);
Expand Down

0 comments on commit c3dc53f

Please sign in to comment.