Kind1 icon indicating copy to clipboard operation
Kind1 copied to clipboard

equivalent redefinition of Bool changes results

Open rigille opened this issue 3 years ago • 2 comments

expected behavior

in the program

type Bool {
  false
  true
}

Bool.and(x: Bool, y: Bool): Bool
  case x {
    false: Bool.false
    true: y
  }

Test: _
  Bool.show(Bool.and(Bool.true, Bool.false))

Test should be result in "Bool.false"

current behavior

Test results in "Bool.true"

rigille avatar Apr 25 '21 14:04 rigille

Redefining a type will mess up the type-checker, we must disable that and display an error when it is attempted.

VictorTaelin avatar Apr 26 '21 12:04 VictorTaelin

agreed

rigille avatar Apr 26 '21 13:04 rigille

Closed because the repository now only contains the code for the Kind2 language.

algebraic-dev avatar Sep 21 '22 16:09 algebraic-dev