# See the License for the specific language governing permissions and
# limitations under the License.
-module test_ropes_buffer_reverse
+# Test the creation of contract with virtual type
-import core
+class MyClass
-redef fun maxlen do return 3
+ type VIRTUAL: Int
-var buffer = new RopeBuffer
+ fun foo(x: VIRTUAL)
+ is
+ expect(x == 1)
+ do
-buffer.reverse
-print "/{buffer}/"
+ end
+end
-buffer.append("x" * (maxlen + 1))
-buffer.add 'y'
-buffer.reverse
-print buffer.to_s
+var first = new MyClass
+first.foo(1)
+first.foo(3) # Fail 3 != 1