diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-01-26 15:30:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-26 15:30:23 -0800 |
| commit | 06f0effb848c6b938e03da8a61e44b3d032380e8 (patch) | |
| tree | e575c83fa7a6b277edc069e4f82f910b74ad56db /tests/bugs/import-with-error.slang.expected | |
| parent | a050f4a144d5ab36c93cd0a443767340301fb32e (diff) | |
Fix handling of errors in imported modules (#387)
* Fix handling of errors in imported modules
- If a semantic error is detected in an imported module, then don't try to generate IR code for it
- Also, if a module (transitively) imports itself, then report that as an error
- The way I'm checking for this is a bit hacky (I'm adding the module to the map of loaded modules, but in an "unfinished" state, and then using that unfinished state to detect the import of a module already being imported).
This isn't a 100% complete solution for any of the related problems, but it improves the user experience for the common case.
* Remove #import test.
The feature is slated to be removed, so it isn't worth fixing up this test case.
Diffstat (limited to 'tests/bugs/import-with-error.slang.expected')
| -rw-r--r-- | tests/bugs/import-with-error.slang.expected | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/bugs/import-with-error.slang.expected b/tests/bugs/import-with-error.slang.expected new file mode 100644 index 000000000..b71dba0f1 --- /dev/null +++ b/tests/bugs/import-with-error.slang.expected @@ -0,0 +1,6 @@ +result code = -1 +standard error = { +tests/bugs/import-with-error-extra.slang(10): error 30015: undefined identifier 'b'. +} +standard output = { +} |
