diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-09-23 12:11:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-23 12:11:45 -0400 |
| commit | ab04bd0dd7dd6a818bbac8c5fef9372c4f597352 (patch) | |
| tree | d37f49273bc48c55ea3e16a243817907af0ebcbc /source/slang/slang-check-overload.cpp | |
| parent | 263f807285c93272abb0c0352be6f8553f01a373 (diff) | |
More `slangpy` features + polishing (#3233)
* Update user-guide with new slangpy features
* More polishing of new slangpy docs
* Update a1-02-slangpy.md
* Only require contiguity for vector element types
* Added `loadOnce/storeOnce` and subscript operations
* Added docs, `DiffTensorView.dims()` & `DiffTensorView.stride(uint)`
* Add constructors, remove storeOnce/loadOnce test
* Adjusted intrinsic definitions
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
| -rw-r--r-- | source/slang/slang-check-overload.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index d7ed5975d..c668155df 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -964,10 +964,14 @@ namespace Slang { auto leftType = DeclRefType::create(m_astBuilder, left.declRef.getParent()); auto rightType = DeclRefType::create(m_astBuilder, right.declRef.getParent()); - if (isSubtype(leftType, rightType)) - return -1; - if (isSubtype(rightType, leftType)) - return 1; + + if (!leftType->equals(rightType)) + { + if (isSubtype(leftType, rightType)) + return -1; + if (isSubtype(rightType, leftType)) + return 1; + } } // TODO: We should generalize above rules such that in a tie a declaration |
