mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-26 22:02:30 +01:00
Improves the error produced when 'Main' is declared with parameters. Resolves a TODO in the typechecker. Explorer only. PR also adds a test for this error message.
15 lines
498 B
Plaintext
15 lines
498 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;
|
|
|
|
fn Main(i: i32) -> i32 {
|
|
return 0;
|
|
// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/function/fail_main_with_parameters.carbon:[[@LINE+1]]: `Main` must not take any parameters
|
|
}
|