diff --git a/NETGenerator/NETGenerator.cs b/NETGenerator/NETGenerator.cs index b3a166256..ee83f1a6d 100644 --- a/NETGenerator/NETGenerator.cs +++ b/NETGenerator/NETGenerator.cs @@ -4989,7 +4989,7 @@ namespace PascalABCCompiler.NETGenerator if (expr != null && !(expr is IConstantNode) && !(expr is IArrayInitializer)) { expr.visit(this); - if (expr.type != null) + if (expr.type != null && expr is ICompiledStaticMethodCallNode) il.Emit(OpCodes.Pop); } il = ilgn;