@@ -42,6 +42,7 @@ EXAMPLES = [
"generic_function_apply",
"generic_function_fail1",
"generic_function_fail2",
+ "generic_function_fail3",
"generic_function_swap",
"generic_function_tuple_map",
"global_variable1",
@@ -0,0 +1,11 @@
+// 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
+
+fn id[T:! Type](x: T) -> T {
+ return x + 0;
+}
+fn main() -> Int {
+ return id(0);
@@ -0,0 +1,4 @@
+ERROR: 6: type error in addition(1)
+expected: Int
+actual: T
+EXIT CODE: 255