Skip to content

[TG-7815] Fix bug in get_recursively_instantiated_type #4913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions jbmc/src/java_bytecode/select_pointer_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Author: Diffblue Ltd.

#include <vector>

#include "expr2java.h"
#include "java_types.h"
#include <util/optional.h>
#include <util/std_types.h>
Expand All @@ -23,6 +24,32 @@ typedef std::unordered_map<irep_idt, std::vector<reference_typet>>
generic_parameter_specialization_mapt;
typedef std::set<irep_idt> generic_parameter_recursion_trackingt;

struct print_generic_parameter_specialization_map
{
const generic_parameter_specialization_mapt &map;
const namespacet &ns;
};

template <typename ostream>
ostream &
operator<<(ostream &stm, const print_generic_parameter_specialization_map &map)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 This is useful

{
stm << "Size: " << map.map.size() << "\n";
for(const auto &elt : map.map)
{
stm << elt.first << ": { ";
for(const auto &pointer_type : elt.second)
{
if(is_java_generic_parameter(pointer_type))
stm << to_java_generic_parameter(pointer_type).get_name() << "; ";
else
stm << type2java(pointer_type, map.ns) << "; ";
}
stm << "}\n";
}
return stm;
}

class namespacet;

class select_pointer_typet
Expand Down