* Bug: check that term is an application.

This commit is contained in:
Eelco Dolstra 2004-10-26 23:30:18 +00:00
parent 5fe9222b36
commit c52dda95a6
2 changed files with 3 additions and 1 deletions

2
NEWS
View file

@ -56,6 +56,8 @@ Major changes include the following:
* Various new operators (e.g., string concatenation).
* Expression evaluation is much faster.
* An Emacs mode for editing Nix expressions (with syntax highlighting
and indentation) has been added.

View file

@ -66,7 +66,7 @@ while (<STDIN>) {
print HEADER "#ifdef __cplusplus\n";
print HEADER "static inline bool match$funname(ATerm e$formals2) {\n";
print HEADER " if (ATgetAFun(e) != sym$funname) return false;\n";
print HEADER " if (ATgetType(e) != AT_APPL || ATgetAFun(e) != sym$funname) return false;\n";
print HEADER "$unpack";
print HEADER " return true;\n";
print HEADER "}\n";