/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ struct Y { int y(); }; template struct X { struct Y; int x_y() { struct Y y; return y.y(); } }; template struct Z { int z() { return 3; }; }; template struct X::Y : Z { int y() { return Y::z() - 3; } }; void instantiate_class_bad() { struct X x; int n = 1 / x.x_y(); }