| Summary: | [xtend] invalid java code generated | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 345371 *** |
The xtend code ------ def collectAllAmbiguousTransitions(ISyntacticSequencerPDAProvider$ISynFollowerOwner state, Set<ISyntacticSequencerPDAProvider$ISynTransition> result, Set<Object> visited) { if(visited.add(state)) { if(state instanceof ISyntacticSequencerPDAProvider$ISynTransition && (state as ISyntacticSequencerPDAProvider$ISynTransition).syntacticallyAmbiguous) result.add(state as ISyntacticSequencerPDAProvider$ISynTransition) for(follower:state.followers) collectAllAmbiguousTransitions(follower, result, visited) } } ------- is compiled to ------- public Object collectAllAmbiguousTransitions(final ISynFollowerOwner state, final Set<ISynTransition> result, final Set<Object> visited) { Object _xifexpression = null; final Set<Object> typeConverted_visited = (Set<Object>)visited; boolean _add = typeConverted_visited.add(state); if (_add) { void _xblockexpression = null; { boolean _operator_and = false; if (!(state instanceof org.eclipse.xtext.serializer.ISyntacticSequencerPDAProvider.ISynTransition)) { _operator_and = false; } else { boolean _isSyntacticallyAmbiguous = ((ISynTransition) state).isSyntacticallyAmbiguous(); _operator_and = BooleanExtensions.operator_and((state instanceof org.eclipse.xtext.serializer.ISyntacticSequencerPDAProvider.ISynTransition), _isSyntacticallyAmbiguous); } if (_operator_and) { result.add(((ISynTransition) state)); } List<ISynState> _followers = state.getFollowers(); for (ISynState follower : _followers) { this.collectAllAmbiguousTransitions(follower, result, visited); } _xblockexpression = (null); } } return _xifexpression; } ------------ which is syntactically incorrect because of ------ void is an invalid type for the variable _xblockexpression _xblockexpression cannot be resolved to a variable java.lang.Error: Unresolved compilation problems: void is an invalid type for the variable _xblockexpression _xblockexpression cannot be resolved to a variable -------