Do assignment lvalue error checking in type checking

Added some tests related to this.
Also improved source file position reporting in error reporting.
This commit is contained in:
Matt Pharr
2011-12-15 11:09:23 -08:00
parent 17fdab2793
commit b8987faeee
4 changed files with 29 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
// Left hand side of assignment statement can't be assigned to
int foo() {return 2;}
int bar()
{
foo() = 2;
}