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

Scala example source code file (names-defaults-neg-ref.check)

This example Scala source code file (names-defaults-neg-ref.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

a, a, a2235, b, b, b2235, c, c, int, string, the, the

The Scala names-defaults-neg-ref.check source code

names-defaults-neg-ref.scala:3: error: in anonymous class $anon, multiple overloaded alternatives of method f define default arguments.
The members with defaults are defined in trait B2235 and trait A2235.
  new A2235 with B2235
      ^
names-defaults-neg-ref.scala:7: error: in class A, multiple overloaded alternatives of method foo define default arguments.
class A {
      ^
names-defaults-neg-ref.scala:17: error: in class C, multiple overloaded alternatives of method bar define default arguments.
The members with defaults are defined in class C and class B.
class C extends B {
      ^
names-defaults-neg-ref.scala:21: error: overriding method bar$default$1 in class B of type => String;
 method bar$default$1 has incompatible type
  def bar(i: Int = 129083) = i
          ^
four errors found

Other Scala examples (source code examples)

Here is a short list of links related to this Scala names-defaults-neg-ref.check source code file:

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.