1 instantiation of NullableType
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
162
pNullableType = new
NullableType
(pUnderlyingType);
88 references to NullableType
Microsoft.CSharp (88)
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (1)
538
ErrAppendType(((
NullableType
)pType).UnderlyingType, null);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
545
else if (callingObjectType is
NullableType
callingNub)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (7)
323
if (!(type1 is
NullableType
nub1) || !(type2 is
NullableType
nub2) ||
330
PredefinedType pt1 = (type1 as
NullableType
).UnderlyingType.PredefinedType;
331
PredefinedType pt2 = (type2 as
NullableType
).UnderlyingType.PredefinedType;
1017
if (ctypeLiftBest > 0 && !(typeFrom is
NullableType
) && fDstHasNull)
1044
NullableType
pConversionNubSourceType = TypeManager.GetNullable(typeFrom);
1050
if (typeTo is
NullableType
)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (1)
330
public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is
NullableType
nubDst && typeSrc == nubDst.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (3)
111
if (_typeDest is
NullableType
)
117
if (_typeSrc is
NullableType
)
200
if (valueSrc.Type is
NullableType
)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (5)
614
NullableType
nubParam;
668
if (!(arg.Type is
NullableType
) || !canConvert(arg.Type.StripNubs(), typeRaw, CONVERTTYPE.NOUDC))
673
Debug.Assert(arg.Type is
NullableType
);
676
if (!(typeRet is
NullableType
))
1015
if (typeObj is
NullableType
nubTypeObj && (typeTmp = nubTypeObj.GetAts()) != swt.GetType())
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (1)
523
else if ((pParamType.IsReferenceType || pParamType is
NullableType
) && cv.IsNullRef)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (4)
128
if (_typeDest is
NullableType
nubDest)
133
if (_typeSrc is
NullableType
nubSrc)
266
private bool BindNubConversion(
NullableType
nubDst)
423
private bool bindImplicitConversionFromNullable(
NullableType
nubSrc)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (2)
839
if (!(pSource is
NullableType
nubSource) || !(pDest is
NullableType
nubDest))
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (4)
42
Debug.Assert(exprSrc != null && exprSrc.Type is
NullableType
);
52
NullableType
nubSrc = (
NullableType
)exprSrc.Type;
69
NullableType
pNubSourceType = TypeManager.GetNullable(exprSrc.Type);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (32)
473
if (info.type1 is
NullableType
&& info.type2 is NullType)
478
if (info.type1 is NullType && info.type2 is
NullableType
)
621
Debug.Assert(bofs.Type1() is
NullableType
|| bofs.Type2() is
NullableType
);
655
if (!(resultType is
NullableType
))
684
if (pParameterType is
NullableType
paramNub)
756
Debug.Assert(!(typeDst is
NullableType
));
770
if (info.type2 is
NullableType
)
790
Debug.Assert(!(typeDst is
NullableType
));
806
if (info.type1 is
NullableType
)
832
Debug.Assert(info.type1 is
NullableType
);
843
Debug.Assert(info.type2 is
NullableType
);
1185
if (type is
NullableType
nub)
1502
if (typeSig is
NullableType
)
1543
NullableType
type = uofs.GetType() as
NullableType
;
1748
Debug.Assert(!(type is
NullableType
));
1772
NullableType
type = uofs.GetType() as
NullableType
;
1902
Debug.Assert(arg1.Type.IsPredefType(PredefinedType.PT_BOOL) || arg1.Type is
NullableType
argNubType1 && argNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1903
Debug.Assert(arg2.Type.IsPredefType(PredefinedType.PT_BOOL) || arg2.Type is
NullableType
argNubType2 && argNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1913
Debug.Assert(expr1.Type.IsPredefType(PredefinedType.PT_BOOL) || expr1.Type is
NullableType
expNubType1 && expNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1914
Debug.Assert(expr2.Type.IsPredefType(PredefinedType.PT_BOOL) || expr2.Type is
NullableType
expNubType2 && expNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1916
if (expr1.Type is
NullableType
|| expr2.Type is
NullableType
)
1926
if (!(nonLiftedArg1.Type is
NullableType
) && !(nonLiftedArg2.Type is
NullableType
))
2092
CType nonNullableType1 = arg1.Type is
NullableType
arg1NubType ? arg1NubType.UnderlyingType : arg1.Type;
2093
CType nonNullableType2 = arg2.Type is
NullableType
arg2NubType ? arg2NubType.UnderlyingType : arg2.Type;
2103
NullableType
typeDst = TypeManager.GetNullable(GetEnumBinOpType(ek, nonNullableType1, nonNullableType2, out AggregateType typeEnum));
2114
NullableType
typeOp = TypeManager.GetNullable(GetPredefindType(ptOp));
2429
if (type is
NullableType
nt)
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (2)
43
typeThru is
NullableType
);
129
typeThru is
NullableType
);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (3)
74
if (pDerived is
NullableType
derivedNub)
292
return pDest.IsReferenceType || pDest is
NullableType
;
433
if (pSource is
NullableType
nubSource)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (7)
426
else if (typeL is
NullableType
nubL && nubL.UnderlyingType.IsEnumType)
440
else if (typeR is
NullableType
nubR && nubR.UnderlyingType.IsEnumType)
447
if (typeL is
NullableType
nubL2 && nubL2.UnderlyingType == typeR)
451
if (typeR is
NullableType
nubR2 && nubR2.UnderlyingType == typeL)
495
Debug.Assert(!(origOp.Type is
NullableType
nub) || !nub.UnderlyingType.IsEnumType);
1019
pType is
NullableType
&& pType.StripNubs() is AggregateType agg && agg.OwningAggregate.IsValueType();
1024
return pExpr is ExprProperty prop && prop.MemberGroup.OptionalObject == pObject && pObject.Type is
NullableType
;
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (4)
43
if (type is
NullableType
nub)
237
else if (arg is
NullableType
nubArg && SymbolLoader.HasBaseConversion(nubArg.UnderlyingType, typeBnd)) // This is inlining FBoxingConv
332
typeBnd = ((
NullableType
)typeBnd).GetAts();
348
arg = ((
NullableType
)arg).GetAts();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (5)
155
public static
NullableType
GetNullable(CType pUnderlyingType)
157
Debug.Assert(!(pUnderlyingType is
NullableType
), "Attempt to make nullable of nullable");
159
NullableType
pNullableType = TypeTable.LookupNullable(pUnderlyingType);
295
typeDst = SubstTypeCore(typeSrc = ((
NullableType
)type).UnderlyingType, pctx);
683
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)
108
if (type is
NullableType
nub)