Re: Re: Extend Scala Class in Java -> JetBrains Idea
Dominik Sienkiewicz <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
Oki. Thanks for the info -- Best Regards Dominik Sienkiewicz > Wiadomość napisana przez Dmitry Petrashko <[email protected]> w dniu 9 mar 2015, o godz. 19:51: > > 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 a topic in the Google Groups "scala-language" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-language/sAS_c0xnc4g/unsubscribe <https://groups.google.com/d/topic/scala-language/sAS_c0xnc4g/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>. -- 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.