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 7933189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:15:08+00:00 2026-06-03T21:15:08+00:00

In Scala, there is a special type of access modifiers: protected[enclosing_scope]. But as soon

  • 0

In Scala, there is a special type of access modifiers: protected[enclosing_scope]. But as soon as I try to use it with package names containing dots, like protected[framework.ui] i get “‘]’ expected but ‘.’ found” compiler error.

It seems really strange, since it is conventional to use dots in package/namespace names in java/.net. Do I miss something or is it impossible to use this access modifier with this type of scope names.

Update

I accepted an answer as it was relevant, though it seems impossible to make what I wanted

  • 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-06-03T21:15:10+00:00Added an answer on June 3, 2026 at 9:15 pm

    You can only restrict the visibility to a scope that you are in, so what do you need dots for?

    If you are in

    package foo.bar
    

    you can make sth.

    private[foo]
    

    and

    private[bar]
    

    What is your use-case for the dots?

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

Sidebar

Related Questions

I'm learning Scala and there is a thing that I can't find out about
I'm looking at http://hseeberger.wordpress.com/2010/11/25/introduction-to-category-theory-in-scala/ and there's a bit of code that I can't understand
As the title says, is there any Scala library that exports functions to convert,
Is there a good scala-esque (I guess I mean functional) way of recursively listing
Is there a simple shuffle function for Scala lists? If not, whats the simplest
is there a way in Scala to sort an array of tuples using and
Are there any tools for performing static analysis of Scala code, similar to FindBugs
Is there a standard way of invoking the scala REPL from a gradle task?
Reading the Scala by Example book and there is this example when Martin explains
I wondered if there are any alternatives to Scala that attempt to offer a

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.