Re: Extend Scala Class in Java -> JetBrains Idea

Dmitry Petrashko <[email protected]>
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>
Hi Dominik,

AFAIK, Intellij Idea has their own implementation behind, that isn't based 
on either scalac or dotty.
You'd better ask Intellij support forums.

Cheers,
Dmitry

On Monday, 9 March 2015 17:57:38 UTC+1, Dominik Sienkiewicz wrote:
>
> Hi 
>
> I'm doing simple test.
> Extend Scala class in Java
>
> object Start {
>   def main(args: Array[String]) {
>     val scalaClassObj = new ScalaClass("Dom", "Sien")
>     println(scalaClassObj.name)
>     println(scalaClassObj.surname)
>
>     val javaClassObj = new JavaClass("Dom2", "Sien2", 31)
>     println(javaClassObj.name)
>     println(javaClassObj.surname)
>     println(javaClassObj.getAge)
>   }
> }
>
>
>
> class ScalaClass(var name: String, var surname: String)
>
>
> public class JavaClass extends ScalaClass {
>     private int age;
>
>     public JavaClass(String name, String surname, int age) {
>         super(name, surname);
>         this.age = age;
>     }
>
>     public int getAge() {
>         return age;
>     }
>
>     public void setAge(int age) {
>         this.age = age;
>     }
> }
>
>
> Everything working ok
>
> Dom
> Sien
> Dom2
> Sien2
> 31
>
> but Idea give me some error
>
>
>
>
> <https://lh3.googleusercontent.com/-XQ-mMEBHkvQ/VP3QtZYUKtI/AAAAAAAAEFg/61PyROs1m_M/s1600/Zrzut%2Bekranu%2B2015-03-09%2Bo%2B17.55.44.png>
>
>
>
>
>
>
>
>
>
>
>
> Why ?
>
> Am I doing something wrong ?
>
>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.