summaryrefslogtreecommitdiff
path: root/Test/dafny0/ResolutionErrors.dfy
diff options
context:
space:
mode:
authorGravatar leino <unknown>2014-08-20 20:21:47 -0700
committerGravatar leino <unknown>2014-08-20 20:21:47 -0700
commit61d55705cdf6a710f1a21ddb2ae2caaa314ca7f6 (patch)
treeeb71616351742e3e1e5b56b334065df860a904af /Test/dafny0/ResolutionErrors.dfy
parent3b51d9251d78bd3de763c951102677eecd764984 (diff)
Start of derived types (aka "new types")
Fixed bug in type checking for integer division.
Diffstat (limited to 'Test/dafny0/ResolutionErrors.dfy')
-rw-r--r--Test/dafny0/ResolutionErrors.dfy9
1 files changed, 8 insertions, 1 deletions
diff --git a/Test/dafny0/ResolutionErrors.dfy b/Test/dafny0/ResolutionErrors.dfy
index 50628438..e0c37e2a 100644
--- a/Test/dafny0/ResolutionErrors.dfy
+++ b/Test/dafny0/ResolutionErrors.dfy
@@ -1101,7 +1101,7 @@ method TraitSynonym()
var x := new JJ; // error: new cannot be applied to a trait
}
-// ----- set comprehensions where the term type is finite ----
+// ----- set comprehensions where the term type is finite -----
module ObjectSetComprehensions {
// allowed in non-ghost context:
@@ -1114,3 +1114,10 @@ module ObjectSetComprehensions {
method D() { var x := set o : object | true :: o; }
}
+
+// ------ regression test for type checking of integer division -----
+
+method IntegerDivision(s: set<bool>)
+{
+ var t := s / s; // error: / cannot be used with sets
+}