Bad parameter of ancestor's constructor when Java argument is different from the field name #41

Closed
jmvanel opened this Issue Mar 4, 2013 · 3 comments

Projects

None yet

2 participants

@jmvanel
jmvanel commented Mar 4, 2013

From this Java

public Concept(Term tm, Memory memory) {
    super(tm.getName());
    term = tm;
}

This gets generated:

class Concept(@BeanProperty var term: Term, var memory: Memory) extends Item(tm.getName) {

( should be Item(term.getName) )

The Java source:
https://open-nars.googlecode.com/svn/trunk/nars/entity/Concept.java

The generated Scala (hand edited) :
https://open-nars.googlecode.com/svn/trunk/nars_core/src/main/scala/nars/entity/Concept.scala

@timowest timowest added a commit that referenced this issue Mar 4, 2013
@timowest #41 Add test a0fbe80
@timowest
Owner
timowest commented Mar 4, 2013

Could you provide a self contained test case? I'd rather not copy GPL licensed code.

@jmvanel
jmvanel commented Mar 4, 2013

Sorry, I tried this , but it does not show the problem.
Hope it helps.
You should not be worried about the licence, this is just a research program that will take long time to get to production, and nobody cares about the usage you do of the code (: ...

import javax.swing.JFrame;
class TestForScalagen extends JFrame {
private JFrame field;

public TestForScalagen( TestForScalagen arg ) {
    super(arg.getTitle());
    this.field = arg;
}
}
@timowest
Owner
timowest commented Mar 5, 2013

Ok, I will give it another try.

@timowest timowest added a commit that referenced this issue Mar 5, 2013
@timowest #41 Add failing test 646f9c8
@timowest timowest added a commit that referenced this issue Jan 26, 2014
@timowest Improve constructor handling #41 a561051
@timowest timowest closed this Jan 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment