alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (protected-constructors.check)

This example Scala source code file (protected-constructors.check) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

access, bar3, ding, ding, foo1, foo2, foo2, foo3, foo3, object, p, p

The Scala protected-constructors.check source code

protected-constructors.scala:17: error: too many arguments for constructor Foo1: ()dingus.Foo1
    val foo1 = new Foo1("abc")
               ^
protected-constructors.scala:18: error: constructor Foo2 in class Foo2 cannot be accessed in object P
 Access to protected constructor Foo2 not permitted because
 enclosing class object P in package hungus is not a subclass of 
 class Foo2 in package dingus where target is defined
    val foo2 = new Foo2("abc")
               ^
protected-constructors.scala:19: error: class Foo3 in object Ding cannot be accessed in object dingus.Ding
 Access to protected class Foo3 not permitted because
 enclosing class object P in package hungus is not a subclass of 
 object Ding in package dingus where target is defined
    val foo3 = new Ding.Foo3("abc")
                        ^
protected-constructors.scala:15: error: class Foo3 in object Ding cannot be accessed in object dingus.Ding
 Access to protected class Foo3 not permitted because
 enclosing class object P in package hungus is not a subclass of 
 object Ding in package dingus where target is defined
    class Bar3 extends Ding.Foo3("abc")
                            ^
protected-constructors.scala:15: error: too many arguments for constructor Object: ()java.lang.Object
    class Bar3 extends Ding.Foo3("abc")
               ^
5 errors found

Other Scala examples (source code examples)

Here is a short list of links related to this Scala protected-constructors.check source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.