public void ConstructPointerOrArrayType()
{
var tree = SyntaxTree.ParseText(@"
class Program
{
static void Main() { }
}");
var mscorlib = MetadataReference.CreateAssemblyReference("mscorlib");
var compilation = Compilation.Create("MyCompilation",
syntaxTrees: new[] { tree }, references: new[] { mscorlib });
TypeSymbol elementType = compilation.GetSpecialType(SpecialType.System_Int32);
TypeSymbol pointerType = compilation.CreatePointerTypeSymbol(elementType);
Assert.AreEqual("int*", pointerType.ToDisplayString());
TypeSymbol arrayType = compilation.CreateArrayTypeSymbol(elementType, rank: 3);
Assert.AreEqual("int[*,*,*]", arrayType.ToDisplayString());
}