1 instantiation of NullableType
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
157
pNullableType = new
NullableType
(pUnderlyingType);
88 references to NullableType
Microsoft.CSharp (88)
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (1)
526
ErrAppendType(((
NullableType
)pType).UnderlyingType, null);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
529
else if (callingObjectType is
NullableType
callingNub)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (7)
319
if (!(type1 is
NullableType
nub1) || !(type2 is
NullableType
nub2) ||
326
PredefinedType pt1 = (type1 as
NullableType
).UnderlyingType.PredefinedType;
327
PredefinedType pt2 = (type2 as
NullableType
).UnderlyingType.PredefinedType;
990
if (ctypeLiftBest > 0 && !(typeFrom is
NullableType
) && fDstHasNull)
1017
NullableType
pConversionNubSourceType = TypeManager.GetNullable(typeFrom);
1023
if (typeTo is
NullableType
)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (1)
326
public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is
NullableType
nubDst && typeSrc == nubDst.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (3)
110
if (_typeDest is
NullableType
)
116
if (_typeSrc is
NullableType
)
199
if (valueSrc.Type is
NullableType
)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (5)
602
NullableType
nubParam;
655
if (!(arg.Type is
NullableType
) || !canConvert(arg.Type.StripNubs(), typeRaw, CONVERTTYPE.NOUDC))
660
Debug.Assert(arg.Type is
NullableType
);
663
if (!(typeRet is
NullableType
))
992
if (typeObj is
NullableType
nubTypeObj && (typeTmp = nubTypeObj.GetAts()) != swt.GetType())
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (1)
522
else if ((pParamType.IsReferenceType || pParamType is
NullableType
) && cv.IsNullRef)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (4)
127
if (_typeDest is
NullableType
nubDest)
132
if (_typeSrc is
NullableType
nubSrc)
264
private bool BindNubConversion(
NullableType
nubDst)
421
private bool bindImplicitConversionFromNullable(
NullableType
nubSrc)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (2)
838
if (!(pSource is
NullableType
nubSource) || !(pDest is
NullableType
nubDest))
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (4)
41
Debug.Assert(exprSrc != null && exprSrc.Type is
NullableType
);
51
NullableType
nubSrc = (
NullableType
)exprSrc.Type;
67
NullableType
pNubSourceType = TypeManager.GetNullable(exprSrc.Type);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (32)
460
if (info.type1 is
NullableType
&& info.type2 is NullType)
465
if (info.type1 is NullType && info.type2 is
NullableType
)
605
Debug.Assert(bofs.Type1() is
NullableType
|| bofs.Type2() is
NullableType
);
639
if (!(resultType is
NullableType
))
667
if (pParameterType is
NullableType
paramNub)
737
Debug.Assert(!(typeDst is
NullableType
));
751
if (info.type2 is
NullableType
)
770
Debug.Assert(!(typeDst is
NullableType
));
786
if (info.type1 is
NullableType
)
811
Debug.Assert(info.type1 is
NullableType
);
822
Debug.Assert(info.type2 is
NullableType
);
1160
if (type is
NullableType
nub)
1475
if (typeSig is
NullableType
)
1515
NullableType
type = uofs.GetType() as
NullableType
;
1711
Debug.Assert(!(type is
NullableType
));
1734
NullableType
type = uofs.GetType() as
NullableType
;
1859
Debug.Assert(arg1.Type.IsPredefType(PredefinedType.PT_BOOL) || arg1.Type is
NullableType
argNubType1 && argNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1860
Debug.Assert(arg2.Type.IsPredefType(PredefinedType.PT_BOOL) || arg2.Type is
NullableType
argNubType2 && argNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1869
Debug.Assert(expr1.Type.IsPredefType(PredefinedType.PT_BOOL) || expr1.Type is
NullableType
expNubType1 && expNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1870
Debug.Assert(expr2.Type.IsPredefType(PredefinedType.PT_BOOL) || expr2.Type is
NullableType
expNubType2 && expNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1872
if (expr1.Type is
NullableType
|| expr2.Type is
NullableType
)
1882
if (!(nonLiftedArg1.Type is
NullableType
) && !(nonLiftedArg2.Type is
NullableType
))
2042
CType nonNullableType1 = arg1.Type is
NullableType
arg1NubType ? arg1NubType.UnderlyingType : arg1.Type;
2043
CType nonNullableType2 = arg2.Type is
NullableType
arg2NubType ? arg2NubType.UnderlyingType : arg2.Type;
2053
NullableType
typeDst = TypeManager.GetNullable(GetEnumBinOpType(ek, nonNullableType1, nonNullableType2, out AggregateType typeEnum));
2064
NullableType
typeOp = TypeManager.GetNullable(GetPredefindType(ptOp));
2372
if (type is
NullableType
nt)
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (2)
41
typeThru is
NullableType
);
125
typeThru is
NullableType
);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (3)
69
if (pDerived is
NullableType
derivedNub)
283
return pDest.IsReferenceType || pDest is
NullableType
;
419
if (pSource is
NullableType
nubSource)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (7)
425
else if (typeL is
NullableType
nubL && nubL.UnderlyingType.IsEnumType)
439
else if (typeR is
NullableType
nubR && nubR.UnderlyingType.IsEnumType)
446
if (typeL is
NullableType
nubL2 && nubL2.UnderlyingType == typeR)
450
if (typeR is
NullableType
nubR2 && nubR2.UnderlyingType == typeL)
494
Debug.Assert(!(origOp.Type is
NullableType
nub) || !nub.UnderlyingType.IsEnumType);
1018
pType is
NullableType
&& pType.StripNubs() is AggregateType agg && agg.OwningAggregate.IsValueType();
1023
return pExpr is ExprProperty prop && prop.MemberGroup.OptionalObject == pObject && pObject.Type is
NullableType
;
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (4)
42
if (type is
NullableType
nub)
233
else if (arg is
NullableType
nubArg && SymbolLoader.HasBaseConversion(nubArg.UnderlyingType, typeBnd)) // This is inlining FBoxingConv
327
typeBnd = ((
NullableType
)typeBnd).GetAts();
343
arg = ((
NullableType
)arg).GetAts();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (5)
150
public static
NullableType
GetNullable(CType pUnderlyingType)
152
Debug.Assert(!(pUnderlyingType is
NullableType
), "Attempt to make nullable of nullable");
154
NullableType
pNullableType = TypeTable.LookupNullable(pUnderlyingType);
281
typeDst = SubstTypeCore(typeSrc = ((
NullableType
)type).UnderlyingType, pctx);
657
Debug.Assert(typeSrc is
NullableType
);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (5)
62
private static readonly Dictionary<CType,
NullableType
> s_nullableTable = new Dictionary<CType,
NullableType
>();
122
public static
NullableType
LookupNullable(CType underlyingType)
124
s_nullableTable.TryGetValue(underlyingType, out
NullableType
result);
128
public static void InsertNullable(CType underlyingType,
NullableType
nullable)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
106
if (type is
NullableType
nub)