Skip to content

Commit

Permalink
Check channel parameter only for builtins
Browse files Browse the repository at this point in the history
Ref. #47
  • Loading branch information
Alexander Senier authored and treiher committed Aug 19, 2020
1 parent bd90b5d commit e114159
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rflx/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,14 +1875,14 @@ def __validate_channel(self, declarations: Mapping[ID, Declaration]) -> None:
a.validate(declarations)

def validate(self, declarations: Mapping[ID, Declaration]) -> None:
if len(self.arguments) < 1:
fail(
f'no channel argument in call to "{self.name}"',
Subsystem.SESSION,
Severity.ERROR,
self.location,
)
if self.name.name in map(ID, ["Read", "Write", "Call", "Data_Available"]):
if self.name in map(ID, ["Read", "Write", "Call", "Data_Available"]):
if len(self.arguments) < 1:
fail(
f'no channel argument in call to "{self.name}"',
Subsystem.SESSION,
Severity.ERROR,
self.location,
)
self.__validate_channel(declarations)
else:
if self.name not in map(ID, ["Append", "Extend"]):
Expand Down

0 comments on commit e114159

Please sign in to comment.