27 references to ObjectCreation
Microsoft.CodeAnalysis.CSharp (7)
Binder\Semantics\Conversions\Conversion.cs (2)
274
internal static Conversion ObjectCreation => new Conversion(ConversionKind.
ObjectCreation
);
708
return Kind == ConversionKind.
ObjectCreation
;
Binder\Semantics\Conversions\ConversionKindExtensions.cs (1)
53
case
ObjectCreation
:
FlowAnalysis\NullableWalker.cs (2)
2161
case ConversionKind.ConditionalExpression or ConversionKind.SwitchExpression or ConversionKind.
ObjectCreation
when
9397
case ConversionKind.
ObjectCreation
:
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
45
case ConversionKind.
ObjectCreation
:
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
237
case ConversionKind.
ObjectCreation
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
Semantics\ImplicitObjectCreationTests.cs (20)
58
assert(0, type: "C", convertedType: "C", symbol: "C..ctor()", ConversionKind.
ObjectCreation
);
59
assert(1, type: "S", convertedType: "S", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
60
assert(2, type: "S", convertedType: "S?", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
133
assert(0, type: "C", convertedType: "C", symbol: "C..ctor()", ConversionKind.
ObjectCreation
);
134
assert(1, type: "S", convertedType: "S", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
135
assert(2, type: "S", convertedType: "S?", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
180
assert(0, type: "C", convertedType: "C", symbol: "C..ctor()", ConversionKind.
ObjectCreation
);
181
assert(1, type: "S", convertedType: "S", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
182
assert(2, type: "S", convertedType: "S?", symbol: "S..ctor()", ConversionKind.
ObjectCreation
);
230
assert(0, type: "C", convertedType: "C", symbol: "C..ctor()", constant: null, ConversionKind.
ObjectCreation
);
231
assert(1, type: "S", convertedType: "S", symbol: "S..ctor()", constant: null, ConversionKind.
ObjectCreation
);
232
assert(2, type: "S", convertedType: "S?", symbol: "S..ctor()", constant: null, ConversionKind.
ObjectCreation
);
233
assert(3, type: "System.Int32", convertedType: "System.Int32", symbol: "System.Int32..ctor()", constant: "0", ConversionKind.
ObjectCreation
);
234
assert(4, type: "System.Boolean", convertedType: "System.Boolean?", symbol: "System.Boolean..ctor()", constant: "False", ConversionKind.
ObjectCreation
);
848
Assert.Equal(ConversionKind.
ObjectCreation
, model.GetConversion(@new).Kind);
889
Assert.Equal(ConversionKind.
ObjectCreation
, model.GetConversion(@new).Kind);
2924
assert(0, type: "System.Index", convertedType: "System.Index", symbol: "System.Index..ctor()", ConversionKind.
ObjectCreation
);
2925
assert(1, type: "System.Index", convertedType: "System.Index", symbol: "System.Index..ctor()", ConversionKind.
ObjectCreation
);
2926
assert(2, type: "System.Index", convertedType: "System.Index", symbol: "System.Index..ctor()", ConversionKind.
ObjectCreation
);
2927
assert(3, type: "System.Index", convertedType: "System.Index", symbol: "System.Index..ctor()", ConversionKind.
ObjectCreation
);