Skip to content

Commit

Permalink
Moving to Classes. This does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
bblfish committed Dec 2, 2022
1 parent 64a7d29 commit 6ce6968
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion bin/clean
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
find java -name "*.class" | xargs rm
find build -name "*.class" | xargs rm
find build -name "*.tasty" | xargs rm
2 changes: 1 addition & 1 deletion bin/compileScalaTrait
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
$SCALA_HOME/bin/scalac -d build -release 17 -explain scala/RDF.scala scala/RDF_Trait.scala

# and so this does not run
#$SCALA_HOME/bin/scala -classpath build class_based.run
$SCALA_HOME/bin/scala -classpath build interf_based.run
6 changes: 3 additions & 3 deletions scala/RDF_Trait.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ object TraitTypes {
trait Node:
def value: String

trait Uri extends Node
class Uri(u: String) extends Node:
def value = u

def mkUri(u: String): Uri =
new Uri { def value = u }
def mkUri(u: String): Uri = new Uri(u)
}

object TraitRDF extends generic.RDF:
Expand Down

0 comments on commit 6ce6968

Please sign in to comment.