// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t" // RUN: %diff "%s.expect" "%t" abstract module M0 { type A type B = int type C(==) type D(==) type E(==) type F(==) type G type H type J type K0 type K1 type L type M(==) type N(==) type O(==) type P type R type S type T type TP0 type TP1 type TP2 } module M1 refines M0 { type A = int type B // error: cannot change a type synonym into an opaque type datatype C = MakeC(ghost x: int, y: int) // error: this type does not support equality type D = C // error: this type does not support equality codatatype E = More(bool, E) // error: this type does not support equality datatype List = Nil | Cons(T, List) type F = List // fine type G = List // error: G is not allowed to take type parameters type H = List // error: H needs two type parameters type J = List // error: J needs one type parameter type K0 = List type K1 type L = List // fine type M = int // fine, because M does support equality type N = List // error: N does not support equality type O = List // fine type P = List // fine class R { } // error: wrong number of type arguments class S { } class T { } // error: wrong number of type arguments type TP0 // error: wrong number of type arguments type TP1 // error: wrong number of type arguments type TP2 }