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)
538ErrAppendType(((NullableType)pType).UnderlyingType, null);
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (4)
324!nub1.UnderlyingType.IsPredefined || 325!nub2.UnderlyingType.IsPredefined) 330PredefinedType pt1 = (type1 as NullableType).UnderlyingType.PredefinedType; 331PredefinedType pt2 = (type2 as NullableType).UnderlyingType.PredefinedType;
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (1)
330public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is NullableType nubDst && typeSrc == nubDst.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (2)
277if (SymbolLoader.HasBaseConversion(nubDst.UnderlyingType, _typeSrc) && !CConversions.FWrappingConv(_typeSrc, nubDst)) 449if (SymbolLoader.HasBaseConversion(nubSrc.UnderlyingType, _typeDest) && !CConversions.FUnwrappingConv(nubSrc, _typeDest))
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (2)
844ExactInference(nubSource.UnderlyingType, nubDest.UnderlyingType);
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (1)
53CType typeBase = nubSrc.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (11)
690pNonLiftedArgument = mustCast(pNonLiftedArgument, paramNub.UnderlyingType); 1187CType nonNub = nub.UnderlyingType; 1782nonLiftedArg = mustCast(nonLiftedArg, type.UnderlyingType); 1783Expr nonLiftedResult = BindIncOpCore(ek, flags, nonLiftedArg, type.UnderlyingType); 1902Debug.Assert(arg1.Type.IsPredefType(PredefinedType.PT_BOOL) || arg1.Type is NullableType argNubType1 && argNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1903Debug.Assert(arg2.Type.IsPredefType(PredefinedType.PT_BOOL) || arg2.Type is NullableType argNubType2 && argNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1913Debug.Assert(expr1.Type.IsPredefType(PredefinedType.PT_BOOL) || expr1.Type is NullableType expNubType1 && expNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 1914Debug.Assert(expr2.Type.IsPredefType(PredefinedType.PT_BOOL) || expr2.Type is NullableType expNubType2 && expNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL)); 2092CType nonNullableType1 = arg1.Type is NullableType arg1NubType ? arg1NubType.UnderlyingType : arg1.Type; 2093CType nonNullableType2 = arg2.Type is NullableType arg2NubType ? arg2NubType.UnderlyingType : arg2.Type; 2431type = nt.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (1)
435pSource = nubSource.UnderlyingType; // pSource.IsValType() known to be true.
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (7)
426else if (typeL is NullableType nubL && nubL.UnderlyingType.IsEnumType) 429convertL = TypeManager.GetNullable(nubL.UnderlyingType.UnderlyingEnumType); 440else if (typeR is NullableType nubR && nubR.UnderlyingType.IsEnumType) 443convertR = TypeManager.GetNullable(nubR.UnderlyingType.UnderlyingEnumType); 447if (typeL is NullableType nubL2 && nubL2.UnderlyingType == typeR) 451if (typeR is NullableType nubR2 && nubR2.UnderlyingType == typeL) 495Debug.Assert(!(origOp.Type is NullableType nub) || !nub.UnderlyingType.IsEnumType);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (2)
237else if (arg is NullableType nubArg && SymbolLoader.HasBaseConversion(nubArg.UnderlyingType, typeBnd)) // This is inlining FBoxingConv 241if (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)
295typeDst = SubstTypeCore(typeSrc = ((NullableType)type).UnderlyingType, pctx);