Fix several float range issues (supersedes #11905) (#12067)

* Fix several float range issues

* address the comments
This commit is contained in:
Andreas Rumpf 2019-08-27 23:19:41 +02:00 • committed by GitHub
commit eaebbfa785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 3 deletions

View file

@ -118,3 +118,14 @@ block:
x3 = R32(4)
doAssert $x1 & $x2 & $x3 == "444"
block:
var x1: range[0'f..1'f] = 1
const x2: range[0'f..1'f] = 1
var x5: range[0'f32..1'f32] = 1'f64
const x6: range[0'f32..1'f32] = 1'f64
reject:
const x: range[0'f..1'f] = 2'f
reject:
const x: range[0'f..1'f] = 2