File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ namespace Fortran::parser {
29
29
struct Keyword ;
30
30
}
31
31
32
+ namespace Fortran ::evaluate { // avoid including all of Evaluate/tools.h
33
+ template <typename T>
34
+ std::optional<bool > AreEquivalentInInterface (const Expr<T> &, const Expr<T> &);
35
+ extern template std::optional<bool > AreEquivalentInInterface<SomeInteger>(
36
+ const Expr<SomeInteger> &, const Expr<SomeInteger> &);
37
+ } // namespace Fortran::evaluate
38
+
32
39
namespace Fortran ::semantics {
33
40
34
41
class Scope ;
@@ -110,7 +117,11 @@ class ParamValue {
110
117
return category_ == that.category_ && expr_ == that.expr_ ;
111
118
}
112
119
bool operator !=(const ParamValue &that) const { return !(*this == that); }
113
- bool IsEquivalentInInterface (const ParamValue &) const ;
120
+ bool IsEquivalentInInterface (const ParamValue &that) const {
121
+ return (category_ == that.category_ &&
122
+ expr_.has_value () == that.expr_ .has_value () &&
123
+ (!expr_ || evaluate::AreEquivalentInInterface (*expr_, *that.expr_ )));
124
+ }
114
125
std::string AsFortran () const ;
115
126
116
127
private:
Original file line number Diff line number Diff line change @@ -758,12 +758,6 @@ void ParamValue::SetExplicit(SomeIntExpr &&x) {
758
758
expr_ = std::move (x);
759
759
}
760
760
761
- bool ParamValue::IsEquivalentInInterface (const ParamValue &that) const {
762
- return (category_ == that.category_ &&
763
- expr_.has_value () == that.expr_ .has_value () &&
764
- (!expr_ || evaluate::AreEquivalentInInterface (*expr_, *that.expr_ )));
765
- }
766
-
767
761
std::string ParamValue::AsFortran () const {
768
762
switch (category_) {
769
763
SWITCH_COVERS_ALL_CASES
You can’t perform that action at this time.
0 commit comments