@@ -264,7 +264,7 @@ public static Method Create(Context cx, IMethodSymbol methodDecl)
264264
265265 var methodKind = methodDecl . MethodKind ;
266266
267- if ( methodKind == MethodKind . ExplicitInterfaceImplementation )
267+ if ( methodKind == MethodKind . ExplicitInterfaceImplementation )
268268 {
269269 // Retrieve the original method kind
270270 methodKind = methodDecl . ExplicitInterfaceImplementations . Select ( m => m . MethodKind ) . FirstOrDefault ( ) ;
@@ -345,11 +345,12 @@ protected void PopulateGenerics(TextWriter trapFile)
345345 foreach ( var tp in symbol . GetAnnotatedTypeArguments ( ) )
346346 {
347347 trapFile . type_arguments ( Type . Create ( Context , tp . Symbol ) , child , this ) ;
348- var ta = tp . Nullability . GetTypeAnnotation ( ) ;
349- if ( ta != Kinds . TypeAnnotation . None )
350- trapFile . type_argument_annotation ( this , child , ta ) ;
351348 child ++ ;
352349 }
350+
351+ var nullability = new Nullability ( symbol ) ;
352+ if ( ! nullability . IsOblivious )
353+ trapFile . type_nullability ( this , NullabilityEntity . Create ( Context , nullability ) ) ;
353354 }
354355 else
355356 {
@@ -380,7 +381,7 @@ protected void PopulateMethod(TextWriter trapFile)
380381 PopulateMethodBody ( trapFile ) ;
381382 PopulateGenerics ( trapFile ) ;
382383 PopulateMetadataHandle ( trapFile ) ;
383- PopulateNullability ( trapFile , symbol . ReturnNullableAnnotation ) ;
384+ PopulateNullability ( trapFile , symbol . GetAnnotatedReturnType ( ) ) ;
384385 }
385386
386387 public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour . PushesLabel ;
0 commit comments