mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Make nativecomp don't error when encountering undeclared types (bug#6573)
* 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.
This commit is contained in:
parent
376bd36f34
commit
f38e969e47
2 changed files with 10 additions and 3 deletions
|
|
@ -336,9 +336,13 @@ Return them as multiple value."
|
|||
(nreverse res))))
|
||||
|
||||
(defun comp-supertypes (type)
|
||||
"Return the ordered list of supertypes of TYPE."
|
||||
(or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt))
|
||||
(error "Type %S missing from typeof-types!" type)))
|
||||
"Return the ordered list of supertypes of TYPE."
|
||||
(or (assq type (comp-cstr-ctxt-typeof-types comp-ctxt))
|
||||
(progn
|
||||
(display-warning
|
||||
'native-compiler
|
||||
(format "Unknown type %S" type))
|
||||
'(t))))
|
||||
|
||||
(defun comp--union-typesets (&rest typesets)
|
||||
"Union types present into TYPESETS."
|
||||
|
|
|
|||
|
|
@ -579,6 +579,9 @@
|
|||
(comp-test-73270-child3 'child3)
|
||||
(comp-test-73270-child4 'child4)))
|
||||
|
||||
(defun comp-test-76573-1-f ()
|
||||
(record 'undeclared-type))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
;; Tromey's tests ;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue