mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 09:50:11 +01:00
Fix IsConcreteType for generic classes and add IsType predicate. (#1204)
* check that the return type is a type, add more implicit conversions * update IsConcreteType for generic classes, add IsType predicate * delete a comment * trivial change * move Witness wrt IsConcreteType and IsType * added comments to tests * update error line numbers
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// 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
|
||||
//
|
||||
// RUN: %{not} %{executable_semantics} %s 2>&1 | \
|
||||
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
||||
// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \
|
||||
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
|
||||
// AUTOUPDATE: %{executable_semantics} %s
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_var_type.carbon:17: Expected a type, but got 42
|
||||
|
||||
package ExecutableSemanticsTest api;
|
||||
|
||||
fn Main () -> i32
|
||||
{
|
||||
// 42 cannot be used as the type of a variable.
|
||||
var x: 42 = 0;
|
||||
return x;
|
||||
}
|
||||
Reference in New Issue
Block a user