提交 100d84e8 编写于 作者: A AlekseyTs 提交者: GitHub

Merge pull request #14659 from AlekseyTs/Issue14510

Always rely on ExecutableCodeBinder to create appropriate ExpressionVariableBinder(s).
......@@ -78,7 +78,8 @@ public sealed override int FixedSize
ExpressionSyntax sizeExpression = arguments[0].Expression;
BinderFactory binderFactory = this.DeclaringCompilation.GetBinderFactory(SyntaxTree);
Binder binder = new ExpressionVariableBinder(sizeExpression, binderFactory.GetBinder(sizeExpression));
Binder binder = binderFactory.GetBinder(sizeExpression);
binder = new ExecutableCodeBinder(sizeExpression, binder.ContainingMemberOrLambda, binder).GetBinder(sizeExpression);
TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression);
BoundExpression boundSizeExpression = binder.GenerateConversionForAssignment(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册