@@ -596,7 +596,7 @@ internal static Expression Convert(this Expression expr, Type type)
596596 return Expression . Convert ( expr , type ) ;
597597 }
598598
599- if ( type . GetTypeInfo ( ) . ContainsGenericParameters )
599+ if ( type . ContainsGenericParameters )
600600 {
601601 return Expression . Call (
602602 CachedReflectionInfo . LanguagePrimitives_ThrowInvalidCastException ,
@@ -614,7 +614,7 @@ internal static Expression Cast(this Expression expr, Type type)
614614 return expr ;
615615 }
616616
617- if ( ( expr . Type . IsFloating ( ) || expr . Type == typeof ( Decimal ) ) && type . GetTypeInfo ( ) . IsPrimitive )
617+ if ( ( expr . Type . IsFloating ( ) || expr . Type == typeof ( Decimal ) ) && type . IsPrimitive )
618618 {
619619 // Convert correctly handles most "primitive" conversions for PowerShell,
620620 // but it does not correctly handle floating point.
@@ -1513,7 +1513,7 @@ internal static bool TryGetDefaultParameterValue(Type type, out object value)
15131513 return true ;
15141514 }
15151515
1516- if ( type . GetTypeInfo ( ) . IsClass )
1516+ if ( type . IsClass )
15171517 {
15181518 value = null ;
15191519 return true ;
@@ -1531,7 +1531,7 @@ internal static bool TryGetDefaultParameterValue(Type type, out object value)
15311531 return true ;
15321532 }
15331533
1534- if ( LanguagePrimitives . IsNumeric ( LanguagePrimitives . GetTypeCode ( type ) ) && ! type . GetTypeInfo ( ) . IsEnum )
1534+ if ( LanguagePrimitives . IsNumeric ( LanguagePrimitives . GetTypeCode ( type ) ) && ! type . IsEnum )
15351535 {
15361536 value = 0 ;
15371537 return true ;
@@ -4856,7 +4856,7 @@ public object VisitBinaryExpression(BinaryExpressionAst binaryExpressionAst)
48564856 var isType = ( Type ) ( ( ConstantExpression ) rhs ) . Value ;
48574857 if ( ! ( isType == typeof ( PSCustomObject ) ) && ! ( isType == typeof ( PSObject ) ) )
48584858 {
4859- lhs = lhs . Type . GetTypeInfo ( ) . IsValueType ? lhs : Expression . Call ( CachedReflectionInfo . PSObject_Base , lhs ) ;
4859+ lhs = lhs . Type . IsValueType ? lhs : Expression . Call ( CachedReflectionInfo . PSObject_Base , lhs ) ;
48604860 if ( binaryExpressionAst . Operator == TokenKind . Is )
48614861 return Expression . TypeIs ( lhs , isType ) ;
48624862 return Expression . Not ( Expression . TypeIs ( lhs , isType ) ) ;
@@ -5162,7 +5162,7 @@ private Expression CompileIncrementOrDecrement(ExpressionAst exprAst, int valueT
51625162 var newValue = DynamicExpression . Dynamic ( PSUnaryOperationBinder . Get ( valueToAdd == 1 ? ExpressionType . Increment : ExpressionType . Decrement ) ,
51635163 typeof ( object ) , tmp ) ;
51645164 exprs . Add ( av . SetValue ( this , newValue ) ) ;
5165- if ( tmp . Type . GetTypeInfo ( ) . IsValueType )
5165+ if ( tmp . Type . IsValueType )
51665166 {
51675167 // This is the result of the expression - it might be unused, but we don't bother knowing if it is used or not.
51685168 exprs . Add ( tmp ) ;
@@ -5363,7 +5363,7 @@ public object VisitMemberExpression(MemberExpressionAst memberExpressionAst)
53635363 if ( memberExpressionAst . Static && ( memberExpressionAst . Expression is TypeExpressionAst ) )
53645364 {
53655365 var type = ( ( TypeExpressionAst ) memberExpressionAst . Expression ) . TypeName . GetReflectionType ( ) ;
5366- if ( type != null && ! type . GetTypeInfo ( ) . IsGenericTypeDefinition )
5366+ if ( type != null && ! type . IsGenericTypeDefinition )
53675367 {
53685368 var member = memberExpressionAst . Member as StringConstantExpressionAst ;
53695369 if ( member != null )
@@ -5419,7 +5419,7 @@ internal static PSMethodInvocationConstraints GetInvokeMemberConstraints(BaseCto
54195419 TypeDefinitionAst typeDefinitionAst = Ast . GetAncestorTypeDefinitionAst ( invokeMemberExpressionAst ) ;
54205420 if ( typeDefinitionAst != null )
54215421 {
5422- targetTypeConstraint = ( typeDefinitionAst as TypeDefinitionAst ) . Type . GetTypeInfo ( ) . BaseType ;
5422+ targetTypeConstraint = ( typeDefinitionAst as TypeDefinitionAst ) . Type . BaseType ;
54235423 }
54245424 else
54255425 {
0 commit comments