diff options
| author | Andrea Corallo | 2025-06-17 09:06:45 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2025-07-09 10:31:20 +0200 |
| commit | 05ecb2b8f0216aa3f391ee661aad4d61fd6aed0e (patch) | |
| tree | 3877c76e27e020d36752b2ca3324d2cf86eda274 /lisp | |
| parent | ebb65d41630786f1dac7727f9490d52d8f55e2f9 (diff) | |
| download | emacs-05ecb2b8f0216aa3f391ee661aad4d61fd6aed0e.tar.gz emacs-05ecb2b8f0216aa3f391ee661aad4d61fd6aed0e.zip | |
Nativecomp don't error with undeclared types (bug#6573) (don't merge)
Backporting f38e969e472 from trunk to emacs-30
* test/src/comp-resources/comp-test-funcs.el (comp-test-76573-1-f): New
function.
* lisp/emacs-lisp/comp-cstr.el (comp-supertypes): Don't error if 'type'
is unknown.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 52ed73ff5c3..ca59eb04901 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el | |||
| @@ -336,9 +336,13 @@ Return them as multiple value." | |||
| 336 | (nreverse res)))) | 336 | (nreverse res)))) |
| 337 | 337 | ||
| 338 | (defun comp-supertypes (type) | 338 | (defun comp-supertypes (type) |
| 339 | "Return the ordered list of supertypes of TYPE." | 339 | "Return the ordered list of supertypes of TYPE." |
| 340 | (or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt)) | 340 | (or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt)) |
| 341 | (error "Type %S missing from typeof-types!" type))) | 341 | (progn |
| 342 | (display-warning | ||
| 343 | 'native-compiler | ||
| 344 | (format "Unknown type %S" type)) | ||
| 345 | '(t)))) | ||
| 342 | 346 | ||
| 343 | (defun comp--union-typesets (&rest typesets) | 347 | (defun comp--union-typesets (&rest typesets) |
| 344 | "Union types present into TYPESETS." | 348 | "Union types present into TYPESETS." |