diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-07-08 18:58:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-08 18:58:42 -0700 |
| commit | 68df74b58a56b0a1fb19b9ec4ff0282969cd6a12 (patch) | |
| tree | 5eaa7eaab892504db53cca4b8044b0c8bcde58b3 /tests | |
| parent | c07a6e6b5f5e0e4839b435ff6c15b821b6dead11 (diff) | |
| parent | 767d47a842700653b8deffe82ccb3c85ad582c13 (diff) | |
Merge pull request #60 from tfoleyNV/revise-rewriter
Revise rewriter
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rewriter/error0.hlsl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/rewriter/error0.hlsl b/tests/rewriter/error0.hlsl index 10957e9e5..e42dec23e 100644 --- a/tests/rewriter/error0.hlsl +++ b/tests/rewriter/error0.hlsl @@ -4,14 +4,24 @@ // the input code, we allow the downstream compiler // to detect and report the error, not us... -// This file presents a simple case, where we forgot a semicolon. +// A key goal here is that errors get reported at +// the right source location, ideally including +// all of file, line, and column info. + +// This file used to have a parse error (missing semicolon), +// but at this point we need to parse function bodies, even +// if we don't check them, so we can't avoid reporting that one. +// +// I'm switching it to a type error instead: + +struct S { int x; }; float4 main() : SV_Target { float a = 1.0; - // no semicolon at the end of this line! - float b = 2.0 + // Invalid assignment: + S s = a; float c = a + b; |
