summaryrefslogtreecommitdiff
path: root/tiger-compiler/lib/misc/contract.hxx
blob: 6b00b592828182e0206506d5c4523808db8be1fc (plain)
1
2
3
4
5
6
7
8
9
10
11
#pragma once

#include <iostream>

template <typename T> std::ostream& operator<<(Contract contract, T& t)
{
  return std::cerr << contract.fileName << ':' << contract.fileLine << ": "
                   << contract.condType << " `" << contract.condText
                   << "' failed.\n"
                   << t;
}