blob: 487bceb558e249c1c5a823605141b2ee0bffd843 [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 Let T be the static type of o.
* ...
* If T.m does not exist, or if F is not a function type, the static type of i
* is Dynamic; otherwise the static type of i is the declared return type of F.
* @description Checks static invocations, when T denotes a class in the
* current scope. Static type of a static method invocation is the declared
* return type of F.
* @static-clean
* @author msyabro
*/
class C {
static int f1() => 1;
static bool f2() => true;
static String f3() => "";
static C f4() => C();
}
main() {
int resultInt = C.f1();
bool resultBool = C.f2();
String resultString = C.f3();
C resultC = C.f4();
}