| // Errors: |
| // |
| // pkg/front_end/testcases/inference_new/infer_use_of_void.dart:17:59: Error: This expression has type 'void' and can't be used. |
| // new C(). /*info:USE_OF_VOID_RESULT*/ /*@target=C::f*/ f(); |
| // ^ |
| |
| library test; |
| import self as self; |
| import "dart:core" as core; |
| |
| class B extends core::Object { |
| synthetic constructor •() → void |
| : super core::Object::•() |
| ; |
| method f() → void {} |
| } |
| class C extends self::B { |
| synthetic constructor •() → void |
| : super self::B::•() |
| ; |
| method f() → void {} |
| } |
| static field void x = new self::C::•().{self::C::f}(); |
| static method main() → dynamic { |
| self::x; |
| } |