Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:44:36+00:00 2026-05-27T20:44:36+00:00

I am working on a small Scala project. I have the following issue with

  • 0

I am working on a small Scala project. I have the following issue with ‘import’:

If, at the top of one of my files, I import two thing with these commands:

import main.Main._
import main.game.Game
       ^^^^

it gives me the following error message at the underlined ‘main’ word: “missing arguments for method main in object Main; follow this method with `_’ if you want to treat it as a partially applied function” which is quite strange especially that it is just an import statement. And naturally no actual importing occures. At first I thought about semicolon inference quirks again but it is not the case. If I swap the two lines and write like this:

import main.game.Game
import main.Main._

then everythinng is fine.

Could anyone shed some light on that? Is it something special about Scala?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:44:37+00:00Added an answer on May 27, 2026 at 8:44 pm

    Presumably you have a main method in object Main. So after import main.Main._ main refers to this method instead of the main package. You could avoid it in several ways:

    1. Change import order, as in the question.
    2. Don’t import the main method, as Daniel C. Sobral’s answer suggests.
    3. Explicitly say you want the top-level main package:

      import _root_.main.game.Game
      

    Following the normal Java package naming convention should avoid this problem in most cases, as you are unlikely to have members (or subpackages) called com or org (though net could be a problem).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a small uni project where I have a program for a
I'm currently working on a small project where I'm loading 16bit wave files with
I have been working through a very small-scale WPF project in order to familiarize
I'm working on a small MVC framework (it's really very small) in Scala. I'd
Iam working on small booking room system. In my solution I have a Reservation
I am working on small python payroll project where you enter employee name, wage,
Im working on a small application to try out an idea that I have.
I am currently working in a .Net project but from university I have also
I’ve been working on a few small scale Access projects that have turned large
I am working on a small game using webgl. Within this game I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.