76 references to CreateTupleTypeSymbol
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
1406return CreateTupleTypeSymbol(underlyingType, elementNames, elementLocations, elementNullableAnnotations: default);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (32)
CodeGen\CodeGenTupleTest.cs (32)
5786Assert.Throws<ArgumentNullException>(() => comp.CreateTupleTypeSymbol(null, default(ImmutableArray<string>))); 6208Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType: vt2)); 6251Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6254Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6257Assert.Equal("(System.Int32, System.Int32)[missing]", comp.CreateTupleTypeSymbol(underlyingType: vt2).ToTestDisplayString()); 6309var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vbType, default(ImmutableArray<string>))); 6601var twoStringsWithNames = comp.CreateTupleTypeSymbol(twoStrings, ImmutableArray.Create("a", "b")); 6603var tuple2 = comp.CreateTupleTypeSymbol(tuple2Underlying); 6608var tuple4 = comp.CreateTupleTypeSymbol(tuple1, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "a", "b")); 6634var tuple2 = comp.CreateTupleTypeSymbol(underlyingType); 6637tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default); 6643tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default, default, default); 6646tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default(ImmutableArray<string>), default(ImmutableArray<Location>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)); 6649tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNames: default); 6652tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementLocations: default); 6655tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6676var tuple2 = comp.CreateTupleTypeSymbol(underlyingType); 6679tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default); 6685tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default, default, default); 6688tuple2 = comp.CreateTupleTypeSymbol(underlyingType, default(ImmutableArray<string>), default(ImmutableArray<Location>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)); 6691tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNames: default); 6694tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementLocations: default); 6697tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6794var tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6797var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 6800tuple2 = comp.CreateTupleTypeSymbol( 6806tuple2 = comp.CreateTupleTypeSymbol( 6813tuple2 = comp.CreateTupleTypeSymbol( 6833var tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: default); 6837var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8))); 6840tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.None, 9)); 6844tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.Annotated, 9));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (41)
CodeGen\CodeGenTuples.vb (41)
6867Assert.Throws(Of ArgumentNullException)(Sub() comp.CreateTupleTypeSymbol(underlyingType:=Nothing, elementNames:=Nothing)) 6869Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item1"))) 6874ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, elementLocations:=ImmutableArray.Create(loc1))) 6891Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create(Of String)(Nothing, Nothing)) 6944Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 6964Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob")) 6985Dim tupleWithSomeNames = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create(Nothing, "Item2", "Charlie")) 7004Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Item2", "Item1")) 7026Dim tuple8WithoutNames = comp.CreateTupleTypeSymbol(vt8, Nothing) 7051Dim tuple8WithNames = comp.CreateTupleTypeSymbol(vt8, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8")) 7076Dim tuple9WithoutNames = comp.CreateTupleTypeSymbol(vt9, Nothing) 7101Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9")) 7126Dim tuple9WithNames = comp.CreateTupleTypeSymbol(vt9, ImmutableArray.Create("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9")) 7152Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 7174Dim tuple2 = comp.CreateTupleTypeSymbol(vt3, ImmutableArray.Create("123", " ", Nothing)) 7178Dim tuple3 = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("return", "class")) 7181Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(underlyingType:=intType)) 7195Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))) 7211Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(csType, Nothing)) 7507Dim twoStringsWithNames = DirectCast(comp.CreateTupleTypeSymbol(twoStrings, ImmutableArray.Create("a", "b")), TypeSymbol) 7509Dim tuple2 = DirectCast(comp.CreateTupleTypeSymbol(tuple2Underlying), TypeSymbol) 7514Dim tuple4 = DirectCast(comp.CreateTupleTypeSymbol(CType(tuple1.TupleUnderlyingType, INamedTypeSymbol), 7548Dim tuple2 = comp.CreateTupleTypeSymbol(underlyingType) 7551tuple2 = comp.CreateTupleTypeSymbol(underlyingType, Nothing) 7557tuple2 = comp.CreateTupleTypeSymbol(underlyingType, Nothing, Nothing, Nothing) 7560tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNames:=Nothing) 7563tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementLocations:=Nothing) 7566tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=Nothing) 7612Dim tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=Nothing) 7615Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=ImmutableArray(Of NullableAnnotation).Empty)) 7618tuple2 = comp.CreateTupleTypeSymbol( 7624tuple2 = comp.CreateTupleTypeSymbol( 7630tuple2 = comp.CreateTupleTypeSymbol( 7647Dim tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=Nothing) 7651Dim ex = Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8))) 7654tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=CreateAnnotations(CodeAnalysis.NullableAnnotation.None, 9)) 7658tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations:=CreateAnnotations(CodeAnalysis.NullableAnnotation.Annotated, 9)) 8938Assert.Throws(Of ArgumentException)(Function() comp.CreateTupleTypeSymbol(underlyingType:=vt2)) 8981Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString()) 8984Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString()) 8987Assert.Equal("(System.Int32, System.Int32)", comp.CreateTupleTypeSymbol(underlyingType:=vt2).ToTestDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
1482Dim tupleWithoutNames = comp.CreateTupleTypeSymbol(vt2, Nothing) 1498Dim tupleWithNames = comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("Alice", "Bob"))