private JCExpression paramType(
     TypedDeclaration nonWideningDecl, ProducedType nonWideningType, int flags) {
   if (gen.typeFact().isUnion(nonWideningType) || gen.typeFact().isIntersection(nonWideningType)) {
     final TypeDeclaration refinedTypeDecl =
         ((TypedDeclaration) CodegenUtil.getTopmostRefinedDeclaration(nonWideningDecl))
             .getType()
             .getDeclaration();
     if (refinedTypeDecl instanceof TypeParameter
         && !refinedTypeDecl.getSatisfiedTypes().isEmpty()) {
       nonWideningType = refinedTypeDecl.getSatisfiedTypes().get(0);
     }
   }
   JCExpression type = gen.makeJavaType(nonWideningDecl, nonWideningType, flags);
   return type;
 }