diff options
| author | Yong He <yonghe@outlook.com> | 2023-05-30 21:15:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-30 21:15:55 -0700 |
| commit | 5c28677ff8bb1ab498954795ae3907f3b6c3b03f (patch) | |
| tree | 9056f65b0637a61700cd70c1af84d5b97b8c1b69 /source/slang/slang-check-constraint.cpp | |
| parent | 5e1974e8cad3396a8c4bedfd63c1ad31b82ec8eb (diff) | |
Fix type checking & loop value hoisting (#2907)
* Fix type checking crash in language server.
* Fix loop var hoisting logic.
Fixes #2903.
* fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-constraint.cpp')
| -rw-r--r-- | source/slang/slang-check-constraint.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-check-constraint.cpp b/source/slang/slang-check-constraint.cpp index cdffcf004..42d01a996 100644 --- a/source/slang/slang-check-constraint.cpp +++ b/source/slang/slang-check-constraint.cpp @@ -792,6 +792,8 @@ namespace Slang Type* fst, Type* snd) { + if (!fst) return false; + if (fst->equals(snd)) return true; // An error type can unify with anything, just so we avoid cascading errors. |
