1 write to _typeDest
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (1)
23
_typeDest
= typeDest;
50 references to _typeDest
Microsoft.CSharp (50)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (50)
82
if (_typeSrc == null ||
_typeDest
== null ||
_typeDest
is MethodGroupType)
87
Debug.Assert(_typeSrc != null &&
_typeDest
!= null); // types must be supplied.
91
switch (
_typeDest
.TypeKind)
105
return _typeSrc ==
_typeDest
;
117
if (_typeSrc ==
_typeDest
&&
127
if (
_typeDest
is NullableType nubDest)
143
FUNDTYPE ftDest =
_typeDest
.FundamentalType;
144
Debug.Assert(ftDest != FUNDTYPE.FT_NONE ||
_typeDest
is ParameterModifierType);
194
&&
_typeDest
.AssociatedSystemType.IsInstanceOfType(srcRuntimeObject)
195
&& CSemanticChecker.CheckTypeAccess(
_typeDest
, _binder.Context.ContextForMemberLookup))
199
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, _exprSrc.Flags & EXPRFLAG.EXF_CANTBENULL);
217
return _binder.bindUserDefinedConversion(_exprSrc, _typeSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
289
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_UNBOX);
316
: ExprFactory.CreateCast(
_typeDest
, _exprSrc);
401
FUNDTYPE ftDest =
_typeDest
.FundamentalType;
404
!
_typeDest
.IsPredefType(PredefinedType.PT_G_OPTIONAL))
414
? ExprFactory.CreateZeroInit(
_typeDest
)
415
: ExprFactory.CreateCast(
_typeDest
, _exprSrc);
439
if (atsNub ==
_typeDest
)
447
if (SymbolLoader.HasBaseConversion(nubSrc.UnderlyingType,
_typeDest
) && !CConversions.FUnwrappingConv(nubSrc,
_typeDest
))
451
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_BOX);
452
if (!
_typeDest
.IsPredefType(PredefinedType.PT_OBJECT))
457
_binder.bindSimpleCast(_exprDest,
_typeDest
, out _exprDest, EXPRFLAG.EXF_FORCE_UNBOX);
462
return 0 == (_flags & CONVERTTYPE.NOUDC) && _binder.bindUserDefinedConversion(_exprSrc, nubSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
483
if (!SymbolLoader.HasBaseConversion(_typeSrc,
_typeDest
))
493
if ((
_typeDest
is ArrayType ||
494
(
_typeDest
is AggregateType aggDest && aggDest.IsInterfaceType &&
501
TypeManager.TypeContainsTyVars(
_typeDest
, null)))
507
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, grfex);
522
if (
_typeDest
is PointerType ptDest && ptDest.ReferentType == VoidType.Instance)
526
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest);
549
if (
_typeDest
.IsEnumType)
558
else if (aggSrc.getThisType().IsSimpleType &&
_typeDest
.IsSimpleType)
582
if (!(
_typeDest
is AggregateType) || !SymbolLoader.HasBaseConversion(pSource,
_typeDest
))
587
if (pSource.OwningAggregate.IsStruct() &&
_typeDest
.FundamentalType == FUNDTYPE.FT_REF)
596
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, flags);
613
if (
_typeDest
is AggregateType aggDest && SymbolLoader.HasBaseConversion(aggTypeSrc, aggDest))
616
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest, EXPRFLAG.EXF_BOX | EXPRFLAG.EXF_CANTBENULL);
660
_exprDest = ExprFactory.CreateConstant(
_typeDest
, ConstVal.GetDefaultValue(
_typeDest
.ConstValKind));
672
Debug.Assert(
_typeDest
.IsSimpleType);
674
Debug.Assert(aggSrc.IsPredefined() &&
_typeDest
.IsPredefined);
676
PredefinedType ptDest =
_typeDest
.PredefinedType;
693
isConstantInRange(constant,
_typeDest
))
721
ConstCastResult result = _binder.bindConstantCast(_exprSrc,
_typeDest
, _needsExprDest, out _exprDest, false);
737
return _binder.bindUserDefinedConversion(_exprSrc, aggTypeSrc,
_typeDest
, _needsExprDest, out _exprDest, true);
740
_binder.bindSimpleCast(_exprSrc,
_typeDest
, out _exprDest);