Clashes of variable when using => in ECLIPSE
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
See the entity in the emission of the event, should NOT be the one in the agent, but seems ECLIPSE is thinking it is that one rather the data in the event class.
Error is in the IDE and even in CLI:
[ERROR] Failed to execute goal io.sarl.maven:sarl-maven-plugin:0.11.0:compile (default-compile) on project agtcity-sarl-base: Assignment to final variable [/home/ssardina/git/soft/agents/MAC-AgtCity/2018-rmit/agtcity-sarl-base.git/src/main/sarl/au/edu/rmit/agtgrp/agtcity/sarl/agents/dummy/SuperSingleAgent.sarl:245] -> [Help 1]
Expected behavior
No error should be given.
System configuration: – SARL version: 0.11.0 – SARL compiler: 0.11.0
-
- [] Eclipse compiler without Maven
-
- Eclipse compiler with Maven
-
- [X ] Maven compiler on the command line
-
- sarlc compiler – Java JDK version (with the manufacturer name): 1.8 – Operating System:
-
- Linux 64bits
-
- Windows 64bits
-
- MacOS 64bits
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Epsilon » [Patch] Clash between "default" variables ... - Eclipse
into some problems when running my EuGENia fix scripts for the Ecore ... "default" has now become a keyword, and there is a...
Read more >Does Eclipse have a way to detect variable name collisions ...
In Eclipse 3.5 you can find it here: Window > Preferences > Java > Compiler > Errors/Warnings > Name shadowing and conflicts.
Read more >Activiti User Guide
Activiti runs on a JDK higher than or equal to version 7. Go to Oracle Java SE downloads and click on button "Download...
Read more >Eclipse Git Tutorial - Vogella.com
This view shows you the Git repositories you can work with in Eclipse and allows you to add existing repositories to Eclipse, create...
Read more >Migrate from Eclipse to IntelliJ IDEA - JetBrains
Windows management in IntelliJ IDEA is slightly different from Eclipse. You can't open several windows with one project, but you can detach any ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re right. For who will be interested about the base reason, the compiler searches for a variable of name
v
following the steps:v
is accessible, it is used;it
, i.e.it.v
, it is used;this
, i.e.this.v
, it is used;v
is statically imported, it is used.I assume that the event
E_MoveRandomly
contains the declaration of a field namedentity
.A quick fix should be:
new E_MoveRandomly => [this.entity = entityName]
.