// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t" // RUN: %diff "%s.expect" "%t" class Array { var Length: nat; } class Test { var a: Array; var b: Array; predicate valid() reads this, a, b; { a != null && b != null && a != b && a.Length == b.Length } } method m1(t: T, u: U) requires t != u; // Cannot compare type parameters (can only compare reference types that could be the same) { } method m2(t: array, a: array) requires t != null && a != null && t != a && t.Length == a.Length; { } class Weird { } method m3(a: Weird, b: Weird) requires a == b; // Bad: second parameter can't be both bool and int. { } method m4(a: Weird, b: Weird) requires a == b; { } // Just to make sure nothing went wrong. method m5(a: array, b: array) requires a == b; // Bad: never equal { }