I am giving a lecture, the lecturer is using Eclipse, but I am using IntelliJ IDEA Community Edition 15.0.6, and the code on the Scala worksheet called rationals.scala is as follows
object rationals{
val x = new Rational(1,2)
x.numer
x.denom
}
//noinspection ScalaPackageName
class Rational(x: Int, y: Int) {
def numer = x
def denom = y
}
The Scala worksheet worksheet will not be calculated and a warning (not an error) appears associated with the class definition that is reading
Package names do not match the directory structure, this can cause problems with resolving classes from this file
In addition, and this is odd, but perhaps significant, the number of IDEA flags and the designation as typos.
Any guidance? THX
source
share