dotnet/roslyn

It looks like LocalRewriter.BuildParamsArray doesn't handle a case of bad or missing int type.

Open

#19,383 opened on May 10, 2017

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-CompilersBugLanguage-C#help wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

            var int32Type = methodOrIndexer.ContainingAssembly.GetPrimitiveType(Microsoft.Cci.PrimitiveTypeCode.Int32);

            return new BoundArrayCreation(
                syntax,
                ImmutableArray.Create(
                    MakeLiteral(syntax, ConstantValue.Create(arrayArgs.Length), int32Type)),
                new BoundArrayInitialization(syntax, arrayArgs),
                paramArrayType);

Contributor guide