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

Scala example source code file (gadts1.check)

This example Scala source code file (gadts1.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

cell, cell, int, int, numterm, numterm

The Scala gadts1.check source code

gadts1.scala:15: error: type mismatch;
 found   : Test.Double
 required: a
    case NumTerm(n) => c.x = Double(1.0) 
                                   ^
gadts1.scala:20: error: class Cell of type Test.Cell does not take type parameters.
    case Cell[a](x: Int) => c.x = 5
             ^
gadts1.scala:20: error: type mismatch;
 found   : Int(5)
 required: a
    case Cell[a](x: Int) => c.x = 5
                                  ^
three errors found

Other Scala examples (source code examples)

Here is a short list of links related to this Scala gadts1.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.