@@ -29,8 +29,6 @@ private static TypeSyntax GetElementType(TypeSyntax type)
2929 {
3030 case ArrayTypeSyntax ats :
3131 return GetElementType ( ats . ElementType ) ;
32- case NullableTypeSyntax nts :
33- return GetElementType ( nts . ElementType ) ;
3432 case PointerTypeSyntax pts :
3533 return GetElementType ( pts . ElementType ) ;
3634 default :
@@ -44,8 +42,7 @@ private static Type GetElementType(Type type)
4442 {
4543 case ArrayType at :
4644 return GetElementType ( at . ElementType . Type ) ;
47- case NamedType nt when nt . symbol . IsBoundNullable ( ) ||
48- nt . symbol . IsBoundSpan ( ) ||
45+ case NamedType nt when nt . symbol . IsBoundSpan ( ) ||
4946 nt . symbol . IsBoundReadOnlySpan ( ) :
5047 return nt . TypeArguments . Single ( ) ;
5148 case PointerType pt :
@@ -60,6 +57,7 @@ protected override void Populate(TextWriter trapFile)
6057 switch ( syntax . Kind ( ) )
6158 {
6259 case SyntaxKind . ArrayType :
60+ case SyntaxKind . PointerType :
6361 Emit ( trapFile , loc ?? syntax . GetLocation ( ) , parent , type ) ;
6462 Create ( cx , GetElementType ( syntax ) , this , GetElementType ( type ) ) ;
6563 return ;
@@ -81,12 +79,6 @@ protected override void Populate(TextWriter trapFile)
8179 Emit ( trapFile , loc ?? syntax . GetLocation ( ) , parent , type ) ;
8280 tts . Elements . Zip ( tt . TupleElements , ( s , t ) => Create ( cx , s . Type , this , t . Type ) ) . Enumerate ( ) ;
8381 return ;
84- case SyntaxKind . PointerType :
85- var pts = ( PointerTypeSyntax ) syntax ;
86- var pt = ( PointerType ) type ;
87- Emit ( trapFile , loc ?? syntax . GetLocation ( ) , parent , type ) ;
88- Create ( cx , pts . ElementType , this , pt . PointedAtType ) ;
89- return ;
9082 case SyntaxKind . GenericName :
9183 var gns = ( GenericNameSyntax ) syntax ;
9284 Emit ( trapFile , loc ?? gns . Identifier . GetLocation ( ) , parent , type ) ;
0 commit comments