@@ -2936,6 +2936,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
29362936
29372937 var parsedTypename = ClrTypeSpec . Parse ( p ) ;
29382938
2939+ if ( parsedTypename is not null )
29392940 {
29402941 // Split the type name to identify the namespace and simple name.
29412942 // If we get something like
@@ -2946,7 +2947,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
29462947
29472948 string assemblyNameString = null ;
29482949
2949- if ( ! string . IsNullOrWhiteSpace ( parsedTypename . AssemblyName ) )
2950+ if ( ! string . IsNullOrWhiteSpace ( parsedTypename ? . AssemblyName ) )
29502951 assemblyNameString = parsedTypename . AssemblyName ;
29512952 else
29522953 {
@@ -3049,7 +3050,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
30493050 //return ClrTypeSpec2.GetTypeFromName(p, CurrentNSVar.deref() as Namespace);
30503051 //}
30513052
3052- if ( canCallClrTypeSpec )
3053+ if ( canCallClrTypeSpec && parsedTypename is not null )
30533054 {
30543055 var t1 = ClrTypeSpec . GetTypeFromParsedName ( parsedTypename , ns ) ;
30553056 if ( t1 is not null )
@@ -3855,7 +3856,7 @@ static byte[] ReadStreamBytes(Stream stream)
38553856 var len = stream . Length ;
38563857 var data = new byte [ len ] ;
38573858 int numRead = stream . Read ( data , 0 , ( int ) len ) ;
3858- if ( numRead < len )
3859+ if ( numRead < len )
38593860 {
38603861 throw new EndOfStreamException ( "Could not read entire stream" ) ;
38613862 }
0 commit comments