diff options
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r-- | src/passes/Precompute.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index ba04a68aa..48977dd78 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -829,7 +829,7 @@ private: return true; } // We can emit a StringConst for a string constant. - if (type.isString()) { + if (type.isRef() && type.getHeapType().isMaybeShared(HeapType::string)) { return true; } // All other reference types cannot be precomputed. Even an immutable GC |