summaryrefslogtreecommitdiff
path: root/Chalice/tests/refinements/TestRefines.chalice
diff options
context:
space:
mode:
Diffstat (limited to 'Chalice/tests/refinements/TestRefines.chalice')
-rw-r--r--Chalice/tests/refinements/TestRefines.chalice30
1 files changed, 30 insertions, 0 deletions
diff --git a/Chalice/tests/refinements/TestRefines.chalice b/Chalice/tests/refinements/TestRefines.chalice
new file mode 100644
index 00000000..3081eb90
--- /dev/null
+++ b/Chalice/tests/refinements/TestRefines.chalice
@@ -0,0 +1,30 @@
+class A {
+ var x:int;
+ function f():int {1}
+ method m(i:int) returns (j:int) {
+ var j [j > 0];
+ }
+}
+
+class B refines C {}
+class C refines D {}
+class D refines A {
+ transforms m(i:int) returns (j:int, k:int)
+ {
+ *
+ }
+}
+
+class X {
+ method m() returns (c: bool)
+ {
+ c := true;
+ }
+}
+
+class Y refines X {
+ refines m() returns (c: bool, d: bool)
+ {
+ c := false;
+ }
+}