1 write to UnderlyingType
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (1)
25UnderlyingType = underlyingType;
38 references to UnderlyingType
Microsoft.CSharp (38)
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (1)
526ErrAppendType(((NullableType)pType).UnderlyingType, null);
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (4)
320!nub1.UnderlyingType.IsPredefined || 321!nub2.UnderlyingType.IsPredefined) 326PredefinedType pt1 = (type1 as NullableType).UnderlyingType.PredefinedType; 327PredefinedType pt2 = (type2 as NullableType).UnderlyingType.PredefinedType;
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (1)
326public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is NullableType nubDst && typeSrc == nubDst.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (2)
275if (SymbolLoader.HasBaseConversion(nubDst.UnderlyingType, _typeSrc) && !CConversions.FWrappingConv(_typeSrc, nubDst)) 447if (SymbolLoader.HasBaseConversion(nubSrc.UnderlyingType, _typeDest) && !CConversions.FUnwrappingConv(nubSrc, _typeDest))
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (2)
843ExactInference(nubSource.UnderlyingType, nubDest.UnderlyingType);
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (1)
52CType typeBase = nubSrc.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (11)
673pNonLiftedArgument = mustCast(pNonLiftedArgument, paramNub.UnderlyingType); 1162CType nonNub = nub.UnderlyingType; 1744nonLiftedArg = mustCast(nonLiftedArg, type.UnderlyingType); 1745Expr nonLiftedResult = BindIncOpCore(ek, flags, nonLiftedArg, type.UnderlyingType); 1859Debug.Assert(arg1.Type.IsPredefType(PredefinedType.PT_BOOL) || arg1.Type is NullableType argNubType1 && argNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1860Debug.Assert(arg2.Type.IsPredefType(PredefinedType.PT_BOOL) || arg2.Type is NullableType argNubType2 && argNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1869Debug.Assert(expr1.Type.IsPredefType(PredefinedType.PT_BOOL) || expr1.Type is NullableType expNubType1 && expNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1870Debug.Assert(expr2.Type.IsPredefType(PredefinedType.PT_BOOL) || expr2.Type is NullableType expNubType2 && expNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 2042CType nonNullableType1 = arg1.Type is NullableType arg1NubType ? arg1NubType.UnderlyingType : arg1.Type; 2043CType nonNullableType2 = arg2.Type is NullableType arg2NubType ? arg2NubType.UnderlyingType : arg2.Type; 2374type = nt.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (1)
421pSource = nubSource.UnderlyingType; // pSource.IsValType() known to be true.
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (7)
425else if (typeL is NullableType nubL && nubL.UnderlyingType.IsEnumType) 428convertL = TypeManager.GetNullable(nubL.UnderlyingType.UnderlyingEnumType); 439else if (typeR is NullableType nubR && nubR.UnderlyingType.IsEnumType) 442convertR = TypeManager.GetNullable(nubR.UnderlyingType.UnderlyingEnumType); 446if (typeL is NullableType nubL2 && nubL2.UnderlyingType == typeR) 450if (typeR is NullableType nubR2 && nubR2.UnderlyingType == typeL) 494Debug.Assert(!(origOp.Type is NullableType nub) || !nub.UnderlyingType.IsEnumType);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (2)
233else if (arg is NullableType nubArg && SymbolLoader.HasBaseConversion(nubArg.UnderlyingType, typeBnd)) // This is inlining FBoxingConv 237if (typeBnd.IsPredefType(PredefinedType.PT_ENUM) || nubArg.UnderlyingType == typeBnd)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (5)
30_ats ??= TypeManager.GetAggregate(TypeManager.GetNullable(), TypeArray.Allocate(UnderlyingType)); 32public override CType StripNubs() => UnderlyingType; 37return UnderlyingType; 51get => typeof(Nullable<>).MakeGenericType(UnderlyingType.AssociatedSystemType); 54public override CType BaseOrParameterOrElementType => UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
281typeDst = SubstTypeCore(typeSrc = ((NullableType)type).UnderlyingType, pctx);