[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-typemaster
parent
c02a32f22e
commit
89d3494c57
|
@ -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
|
||||
-------------
|
||||
|
|
|
@ -1264,16 +1264,11 @@
|
|||
|
||||
<choose>
|
||||
<when test="not( $yields ) or $yields=''">
|
||||
<message>
|
||||
<preproc:error>
|
||||
<text>error: unable to determine @yields for class `</text>
|
||||
<value-of select="$as" />
|
||||
<text>' (has the class been imported?)</text>
|
||||
</message>
|
||||
|
||||
<!-- just retain the name; it'll be used for an error message,
|
||||
since it won't be foudn -->
|
||||
<!-- TODO: this is dangerous; find a way to propagate the error -->
|
||||
<value-of select="$as" />
|
||||
</preproc:error>
|
||||
</when>
|
||||
|
||||
<otherwise>
|
||||
|
|
Loading…
Reference in New Issue