blob: 7212278f56d4211b7a35d219db8e20b6f92439c0 [file] [log] [blame]
// TODO(multitest): This was automatically migrated from a multitest and may
// contain strange or dead code.
// Copyright (c) 2012, 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.
// Test that type variables referenced from within static members are malformed.
class Foo<T> implements I<T> {
Foo() {}
f) {
return new Foo<String>();
// T is in scope for a factory method.
factory Foo.I(Foo<T> f) {
Foo<T> x = f;
return f;
// T is not in scope for a static field.
get f {
return new Foo<String>();
static void set f(
value) {}
abstract class I<T> {
factory I(Foo<T> f) = Foo<T>.I;
main() {
Foo.m(new Foo<String>());
new I(new Foo<String>());
var x = Foo.f;
Foo.f = x;