Scala worksheet (interactive mode) does not compile correctly using imports from same project file. "Not found" and "Object <object> is not a.."

I am quite new to Scala, and I have been searching different foras but not been able to find an answer to this exact question.

Normally, the Scala worksheet works just fine. I am able to compile without any complications. However, when I tried to import from the same folder (within the same project), I get some issues. See the attached images.

I have tried to change the first line of from import Uke4._ to package Uke4, and included the function show inside an object called exprs. Doing this I do not get any error messages, but no code is executed on the right hand side.

I suspect there is some issues with the imports or the file structure, considering the error messages.

  • IntelliJ 2017.2.5
  • Scala 2.12.3
  • SBT 0.13.16
  • JDK 1.8.0_102