Exemplo n.º 1
0
        internal override void GenerateMethodBody(TypeCompilationState compilationState, DiagnosticBag diagnostics)
        {
            var noLocals = ImmutableArray <LocalSymbol> .Empty;
            var initializerInvocation = MethodCompiler.BindConstructorInitializer(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))));
        }