Skip to content
Snippets Groups Projects
Commit 6bc489e2 authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos
Browse files

Make constructors of Expr subclasses with companion .apply methods private

parent 051688f8
No related branches found
No related tags found
No related merge requests found
......@@ -305,7 +305,7 @@ object Trees {
if(or == null) None else Some(or.exprs)
}
class Or(val exprs: Seq[Expr]) extends Expr with FixedType {
class Or private[Trees] (val exprs: Seq[Expr]) extends Expr with FixedType {
val fixedType = BooleanType
assert(exprs.size >= 2)
......@@ -332,7 +332,7 @@ object Trees {
}
}
class Iff(val left: Expr, val right: Expr) extends Expr with FixedType {
class Iff private[Trees] (val left: Expr, val right: Expr) extends Expr with FixedType {
val fixedType = BooleanType
override def equals(that: Any): Boolean = (that != null) && (that match {
......@@ -356,7 +356,7 @@ object Trees {
if(imp == null) None else Some(imp.left, imp.right)
}
class Implies(val left: Expr, val right: Expr) extends Expr with FixedType {
class Implies private[Trees] (val left: Expr, val right: Expr) extends Expr with FixedType {
val fixedType = BooleanType
override def equals(that: Any): Boolean = (that != null) && (that match {
......@@ -379,7 +379,7 @@ object Trees {
}
}
class Not private (val expr: Expr) extends Expr with FixedType {
class Not private[Trees] (val expr: Expr) extends Expr with FixedType {
val fixedType = BooleanType
override def equals(that: Any) : Boolean = (that != null) && (that match {
......@@ -414,7 +414,7 @@ object Trees {
}
}
class Equals(val left: Expr, val right: Expr) extends Expr with FixedType {
class Equals private[Trees] (val left: Expr, val right: Expr) extends Expr with FixedType {
val fixedType = BooleanType
override def equals(that: Any): Boolean = (that != null) && (that match {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment