blob: c618c6eb6bc123a67cdac415eb3c8c360ada58dd [file] [log] [blame]
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion
/// setterSignature:
/// returnType? set identifier formalParameterList
/// ;
/// @description Checks that various valid setter declarations do not cause any
/// errors.
/// @author iefremov
abstract class A<U, V> {
void set s2(var x) {}
set s4(var x) {}
void set s5(var x);
set s6(var x);
void set s7(U x) {}
set s8(V x) {}
}
class C<U, V> extends A<U, V> {
static void set s1(var x) {}
static set s3(var x) {}
void set s5(var x) {}
set s6(var x) {}
}
main() {
// don't need a try/catch block here, we don't want to hide an exception
C.s1 = null;
C.s3 = null;
new C().s2 = null;
new C().s4 = null;
new C<int, double>().s7 = 42;
new C<C, C>().s8 = new C();
}