chasing unchecked options
authorEric Prud'hommeaux <bertails@w3.org>
Sun, 27 Dec 2009 14:42:03 -0800
changeset 72 ef8cd60aa260
parent 69 ed5415596dfe
child 73 853d9bcb1e41
chasing unchecked options
project/build/RDB2RDF.scala
src/main/scala/RDB2RDFMain.scala
--- a/project/build/RDB2RDF.scala	Sun Dec 20 09:05:28 2009 -0500
+++ b/project/build/RDB2RDF.scala	Sun Dec 27 14:42:03 2009 -0800
@@ -2,6 +2,8 @@
 
 class RDB2RDF(info: ProjectInfo) extends DefaultProject(info) {
 
+  override def compileOptions = super.compileOptions ++ Seq(Unchecked, Deprecation, ExplainTypes)
+
   val scalatools = "scala-tools" at "http://scala-tools.org/repo-snapshots"
 
   val scalatest = "org.scalatest" % "scalatest" % "1.0.1-for-scala-2.8.0.Beta1-RC1-with-test-interfaces-0.2-SNAPSHOT" % "test->default"
--- a/src/main/scala/RDB2RDFMain.scala	Sun Dec 20 09:05:28 2009 -0500
+++ b/src/main/scala/RDB2RDFMain.scala	Sun Dec 27 14:42:03 2009 -0800
@@ -103,6 +103,7 @@
 	case Some(Attribute(constrainMe.attribute.n)) => 
 	  RDFNoder(rel, constrainMe)
 	case _ => {
+	  // e.g. Attribute(Name("id")) or None
 	  if (reldesc.attributes.contains(constrainMe.attribute)) {
 	    reldesc.attributes(constrainMe.attribute) match {
 	      case ForeignKey(fkrel, fkattr) =>
@@ -206,9 +207,9 @@
 
   def filter(varmap:Map[Var, SQL2RDFValueMapper], f:SparqlPrimaryExpression):PrimaryExpression = {
     val (lTerm:Term, rTerm:Term, sqlexpr:((RelAliasAttribute,RValueAttr)=>PrimaryExpression)) = f match {
-      case SparqlPrimaryExpressionEq(l, r) => (l.term, r.term, PrimaryExpressionEq(_,_)) // Alex, how can i return PrimaryExpressionEq here?
+      case SparqlPrimaryExpressionEq(l, r) => (l.term, r.term, PrimaryExpressionEq(_,_))
       case SparqlPrimaryExpressionLt(l, r) => (l.term, r.term, PrimaryExpressionLt(_,_))
-      }
+    }
 // PrimaryExpressionEq(_,_) === (x,y) => PrymaryExpressionEq(x,y)
     lTerm match {
       // does not handle FILTER (<x> = ?v)