Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use ArrayBuffer instead of Array to build Formulae

  • Loading branch information...
commit 964776f528a8ec4da889638ab41e5dbc8a9164a1 1 parent f539781
@adriaanm adriaanm authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
View
6 src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
@@ -2064,11 +2064,11 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
type FormulaBuilder = ArrayBuffer[Clause]
def formulaBuilder = ArrayBuffer[Clause]()
def addFormula(buff: FormulaBuilder, f: Formula): Unit = buff ++= f
- def toFormula(buff: FormulaBuilder): Formula = buff.toArray
+ def toFormula(buff: FormulaBuilder): Formula = buff
// CNF: a formula is a conjunction of clauses
- type Formula = Array[Clause]
- def formula(c: Clause*): Formula = c.toArray
+ type Formula = FormulaBuilder
+ def formula(c: Clause*): Formula = ArrayBuffer(c: _*)
type Clause = Set[Lit]
// a clause is a disjunction of distinct literals
Please sign in to comment.
Something went wrong with that request. Please try again.