Files
carbon-lang/explorer/testdata/class/fail_call_undefined_method.carbon
T
Richard Smith 7fe06a5d2f Unify handling of calls to functions and to methods. (#2620)
This fixes some bugs in each, where the fixes had only been made on one
side of the switch or the other. Also don't forget to instantiate
deduced generic arguments in a call when we read them out of the AST.
2023-02-22 13:51:25 -08:00

20 lines
568 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
// RUN: %{not} %{explorer-run}
// RUN: %{not} %{explorer-run-trace}
package ExplorerTest api;
class A {
fn F[self: Self]() -> i32;
}
fn Main() -> i32 {
var a: A = {};
// CHECK:STDERR: RUNTIME ERROR: {{.*}}/explorer/testdata/class/fail_call_undefined_method.carbon:[[@LINE+1]]: attempt to call function `F` that has not been defined
return a.F();
}