Created
March 10, 2017 00:34
-
-
Save controlflow/35f5afb6b3f99f8654faa7f698bcd815 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var typeCheckClassification = typeCheckType.ClassifyTypeAdvanced(); | |
if (typeCheckClassification == TypeParameterOracle.Classification.REFERENCE_TYPE && sourceType.IsValueType()) | |
return TypeCheckStaticAnalysisResult.AlwaysFalse; | |
if (typeCheckClassification == TypeParameterOracle.Classification.NON_NULLABLE_VALUE_TYPE && sourceType.IsReferenceType()) | |
return TypeCheckStaticAnalysisResult.AlwaysFalse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (typeCheckType.ClassifyTypeAdvanced()) | |
{ | |
case TypeParameterOracle.Classification.REFERENCE_TYPE when sourceType.IsValueType(): | |
case TypeParameterOracle.Classification.NON_NULLABLE_VALUE_TYPE when sourceType.IsReferenceType(): | |
return TypeCheckStaticAnalysisResult.AlwaysFalse; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment