Stratego editor/compiler disrepancy
In the following code:
nabl-disambiguation-def(|ctx__, ctx-terms__, ctx-string__) = ?m ; where("disamb0" := ctx-string__) ; where([at*, cp, ct, a*] := ctx-terms__) ; ((((acc := <new-task(|ctx__, [])> Id( <get-or-create-property-task(|ctx__, NablProp_access())> m ) ; {prev__: ?prev__ ; pt* := <new-task(|ctx__, [prev__])> Id( <get-or-create-property-task(|ctx__, NablProp_parameter-types())> m ) }) ; {prev__: ?prev__ ; mt := <new-task(|ctx__, [prev__])> SubURI(NablNsType(), m) }) ; {prev__: ?prev__ ; mp := <new-task(|ctx__, [prev__])> SubURI(NablNsPackage(), m) }) ; {prev__: ?prev__ ; {l__, r__: where({l__, r__: where({l__, r__: where({l__, r__: where(<new-task(|ctx__, [prev__])> Eq(Public(), acc) ; ?l__) ; where((<new-task(|ctx__, [prev__])> Eq(Private(), acc) ; {prev__: ?prev__ ; <new-task(|ctx__, [prev__])> Eq(ct, mt) }) ; ?r__) ; <new-task(|ctx__, [prev__])> Choice([l__, r__]) } ; ?l__) ; where((<new-task(|ctx__, [prev__])> Eq(Default(), acc) ; {prev__: ?prev__ ; <new-task(|ctx__, [prev__])> Eq(cp, mp) }) ; ?r__) ; <new-task(|ctx__, [prev__])> Choice([l__, r__]) } ; ?l__) ; where((<new-task(|ctx__, [prev__])> Eq(Protected(), acc) ; {prev__: ?prev__ ; <new-task(|ctx__, [prev__])> Eq(cp, mp) }) ; ?r__) ; <new-task(|ctx__, [prev__])> Choice([l__, r__]) } ; ?l__) ; where((<new-task(|ctx__, [prev__])> Eq(Protected(), acc) ; {prev__: ?prev__ ; <new-task(|ctx__, [prev__])> RelationMatch("<extends:", ct, mt) }) ; ?r__) ; <new-task(|ctx__, [prev__])> Choice([l__, r__]) } }) ; !( m , <new-task(|ctx__, [prev__])> RelationDistance("<widens:", at*, pt*) )
The editor does not produce an error for the last reference to
prev__
(in<new-task(|ctx__, [prev__])> RelationDistance("<widens:", at*, pt*)
), but the compiler (correctly) does:Submitted by Gabriël Konat on 21 March 2014 at 09:46[java] ** Error in definition nabl-disambiguation-def: [java] variable 'prev__' used, but not bound [java] [ Main | error ] Compilation failed (3.28 secs)
Issue Log
On 21 March 2014 at 09:46 Gabriël Konat tagged error
On 21 March 2014 at 09:46 Gabriël Konat tagged stratego
Log in to post comments