Skip to content

Commit

Permalink
Stub out comparison operators for records
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Dec 22, 2012
1 parent 4bd3014 commit 7e127ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sem.c
Expand Up @@ -611,6 +611,12 @@ static void sem_declare_predefined_ops(tree_t decl)
sem_declare_binary(ident_new("\">=\""), t, t, std_bool, "ageq");
break;

case T_RECORD:
// Operators on records
sem_declare_binary(ident_new("\"=\""), t, t, std_bool, "req");
sem_declare_binary(ident_new("\"/=\""), t, t, std_bool, "rneq");
break;

case T_PHYSICAL:
// Multiplication
sem_declare_binary(mult, t, std_int, t, "mul");
Expand Down
1 change: 1 addition & 0 deletions test/regress/record1.vhd
Expand Up @@ -27,6 +27,7 @@ begin
assert (a.x = 1) and (a.y = 2);
a := k;
assert (a.x = k.x) and (a.y = k.y);
--assert a = k;
wait;
end process;

Expand Down

0 comments on commit 7e127ee

Please sign in to comment.