From 89d3494c57829f171f245baa962733ce0fe276dd Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 23 Sep 2020 15:59:20 -0400 Subject: [PATCH] [DEV-8492] Fail lv:param-class-to-yields rather than awaiting propagation This problem manifested when the name of the attempted classification is the same name as another object. For example, if we have `t:match-class name="foo"`, and `foo` is a param instead of a class, then `@yields` will fail, and it'd fall back to matching on the param. This is absolutely not what we want. The error message in this context is ugly, but it does work. Example: !!! Unknown match @on (/lv:package/lv:classify/match): `error: unable to determine @yields for class `scheduled_ai' (has the class been imported?)' is unknown for classification --vis-scheduled-ai-type --- RELEASES.md | 5 +++++ src/current/include/preproc/template.xsl | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index bf5466a6..676e51b8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -16,6 +16,11 @@ commits that introduce the changes. To make a new release, run NEXT ==== +Compiler +-------- +- `lv:param-class-to-yields` will now trigger a failure rather than relying + on propagating bad values, which may not result in failure if the symbol + is represented by another type (non-class) of object. Miscellaneous ------------- diff --git a/src/current/include/preproc/template.xsl b/src/current/include/preproc/template.xsl index 743e5151..f326dccb 100644 --- a/src/current/include/preproc/template.xsl +++ b/src/current/include/preproc/template.xsl @@ -1264,16 +1264,11 @@ - + error: unable to determine @yields for class ` ' (has the class been imported?) - - - - - +