示例#1
0
        internal override void GenerateMethodBody(
            TypeCompilationState compilationState,
            BindingDiagnosticBag diagnostics
            )
        {
            var noLocals = ImmutableArray <LocalSymbol> .Empty;
            var initializerInvocation = MethodCompiler.BindImplicitConstructorInitializer(
                this,
                diagnostics,
                compilationState.Compilation
                );
            var syntax = initializerInvocation.Syntax;

            compilationState.AddSynthesizedMethod(
                this,
                new BoundBlock(
                    syntax,
                    noLocals,
                    ImmutableArray.Create <BoundStatement>(
                        new BoundExpressionStatement(syntax, initializerInvocation),
                        new BoundReturnStatement(syntax, RefKind.None, null)
                        )
                    )
                );
        }