Skip to content

Commit 051bf9c

Browse files
committed
[Flang] fix a copy-paste error in scope.cpp
found by PVS-Studio. Reviewed By: jeanPerier, klausler Differential Revision: https://reviews.llvm.org/D142306
1 parent 8f15c4c commit 051bf9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Semantics/scope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ std::optional<parser::MessageFixedText> Scope::SetImportKind(ImportKind kind) {
272272
? "IMPORT,NONE must be the only IMPORT statement in a scope"_err_en_US
273273
: "IMPORT,ALL must be the only IMPORT statement in a scope"_err_en_US;
274274
} else if (kind != *importKind_ &&
275-
(kind != ImportKind::Only || kind != ImportKind::Only)) {
275+
(kind != ImportKind::Only && *importKind_ != ImportKind::Only)) {
276276
return "Every IMPORT must have ONLY specifier if one of them does"_err_en_US;
277277
} else {
278278
return std::nullopt;

0 commit comments

Comments
 (0)