Changeset View
Changeset View
Standalone View
Standalone View
flang/lib/Evaluate/characteristics.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | std::optional<TypeAndShape> TypeAndShape::Characterize( | ||||
const ActualArgument &arg, FoldingContext &context) { | const ActualArgument &arg, FoldingContext &context) { | ||||
return Characterize(arg.UnwrapExpr(), context); | return Characterize(arg.UnwrapExpr(), context); | ||||
} | } | ||||
bool TypeAndShape::IsCompatibleWith(parser::ContextualMessages &messages, | bool TypeAndShape::IsCompatibleWith(parser::ContextualMessages &messages, | ||||
const TypeAndShape &that, const char *thisIs, const char *thatIs, | const TypeAndShape &that, const char *thisIs, const char *thatIs, | ||||
bool isElemental) const { | bool isElemental) const { | ||||
const auto &len{that.LEN()}; | const auto &len{that.LEN()}; | ||||
if (!type_.IsTypeCompatibleWith(that.type_)) { | if (!type_.IsTkCompatibleWith(that.type_)) { | ||||
messages.Say( | messages.Say( | ||||
"%1$s type '%2$s' is not compatible with %3$s type '%4$s'"_err_en_US, | "%1$s type '%2$s' is not compatible with %3$s type '%4$s'"_err_en_US, | ||||
thatIs, that.type_.AsFortran(len ? len->AsFortran() : ""), thisIs, | thatIs, that.type_.AsFortran(len ? len->AsFortran() : ""), thisIs, | ||||
type_.AsFortran()); | type_.AsFortran()); | ||||
return false; | return false; | ||||
} | } | ||||
return isElemental || | return isElemental || | ||||
CheckConformance(messages, shape_, that.shape_, thisIs, thatIs); | CheckConformance(messages, shape_, that.shape_, thisIs, thatIs); | ||||
▲ Show 20 Lines • Show All 893 Lines • Show Last 20 Lines |