Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

override keyword missing #58

Closed
tyrcho opened this Issue · 2 comments

2 participants

@tyrcho

When I convert this very simple code :

import java.awt.Label;

public class FirstApplet extends java.applet.Applet {
   public void init (){
      add(new Label("Hello World"));
   }
}

It generates

import java.awt.Label

class FirstApplet extends java.applet.Applet {

  def init() {
    add(new Label("Hello World"))
  }
}

Which does not compile since init overrides a method in Applet.

Note that I am using this https://github.com/dnadolny/java-to-scala-plugin plugin to paste the java code.

@timowest

Scalagen operates on the source code level, so you will need to use the Override annotation to get the results you want.

@tyrcho

I understand, it is really not a big issue.

Maybe you could document such restrictions of the tool in the README ? This file is a good start https://github.com/dnadolny/java-to-scala-plugin/blob/master/README.md (section Problems ...)

For instance this @Override behaviour changed a bit between java 5 and 6 I think, maybe also explain which version of Java sources you target.

@timowest timowest closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.