1 write to _typeDest
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (1)
24
_typeDest
= typeDest;
50 references to _typeDest
Microsoft.CSharp (50)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (50)
83
if (_typeSrc == null ||
_typeDest
== null ||
_typeDest
is MethodGroupType)
88
Debug.Assert(_typeSrc != null &&
_typeDest
!= null); // types must be supplied.
92
switch (
_typeDest
.TypeKind)
106
return _typeSrc ==
_typeDest
;
118
if (_typeSrc ==
_typeDest
&&
128
if (
_typeDest
is NullableType nubDest)
144
FUNDTYPE ftDest =
_typeDest
.FundamentalType;
145
Debug.Assert(ftDest != FUNDTYPE.FT_NONE ||
_typeDest
is ParameterModifierType);
195
&&
_typeDest
.AssociatedSystemType.IsInstanceOfType(srcRuntimeObject)
196
&& CSemanticChecker.CheckTypeAccess(
_typeDest
, _binder.Context.ContextForMemberLookup))
200
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, _exprSrc.Flags & EXPRFLAG.EXF_CANTBENULL);
218
return _binder.bindUserDefinedConversion(_exprSrc, _typeSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
291
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_UNBOX);
318
: ExprFactory.CreateCast(
_typeDest
, _exprSrc);
403
FUNDTYPE ftDest =
_typeDest
.FundamentalType;
406
!
_typeDest
.IsPredefType(PredefinedType.PT_G_OPTIONAL))
416
? ExprFactory.CreateZeroInit(
_typeDest
)
417
: ExprFactory.CreateCast(
_typeDest
, _exprSrc);
441
if (atsNub ==
_typeDest
)
449
if (SymbolLoader.HasBaseConversion(nubSrc.UnderlyingType,
_typeDest
) && !CConversions.FUnwrappingConv(nubSrc,
_typeDest
))
453
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_BOX);
454
if (!
_typeDest
.IsPredefType(PredefinedType.PT_OBJECT))
459
_binder.bindSimpleCast(_exprDest,
_typeDest
, out _exprDest, EXPRFLAG.EXF_FORCE_UNBOX);
464
return 0 == (_flags & CONVERTTYPE.NOUDC) && _binder.bindUserDefinedConversion(_exprSrc, nubSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
485
if (!SymbolLoader.HasBaseConversion(_typeSrc,
_typeDest
))
495
if ((
_typeDest
is ArrayType ||
496
(
_typeDest
is AggregateType aggDest && aggDest.IsInterfaceType &&
503
TypeManager.TypeContainsTyVars(
_typeDest
, null)))
509
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, grfex);
524
if (
_typeDest
is PointerType ptDest && ptDest.ReferentType == VoidType.Instance)
528
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest);
551
if (
_typeDest
.IsEnumType)
560
else if (aggSrc.getThisType().IsSimpleType &&
_typeDest
.IsSimpleType)
584
if (!(
_typeDest
is AggregateType) || !SymbolLoader.HasBaseConversion(pSource,
_typeDest
))
589
if (pSource.OwningAggregate.IsStruct() &&
_typeDest
.FundamentalType == FUNDTYPE.FT_REF)
598
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, flags);
615
if (
_typeDest
is AggregateType aggDest && SymbolLoader.HasBaseConversion(aggTypeSrc, aggDest))
618
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_BOX | EXPRFLAG.EXF_CANTBENULL);
662
_exprDest = ExprFactory.CreateConstant(
_typeDest
, ConstVal.GetDefaultValue(
_typeDest
.ConstValKind));
675
Debug.Assert(
_typeDest
.IsSimpleType);
677
Debug.Assert(aggSrc.IsPredefined() &&
_typeDest
.IsPredefined);
679
PredefinedType ptDest =
_typeDest
.PredefinedType;
696
isConstantInRange(constant,
_typeDest
))
724
ConstCastResult result = _binder.bindConstantCast(_exprSrc,
_typeDest
, _needsExprDest, out _exprDest, false);
740
return _binder.bindUserDefinedConversion(_exprSrc, aggTypeSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
743
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest);