|
|
@@ -72,10 +72,14 @@ var c: C = {.x = ()};
|
|
|
|
|
|
impl library "[[@TEST_NAME]]";
|
|
|
|
|
|
-// CHECK:STDERR: fail_export_in_impl.impl.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files [ExportFromImpl]
|
|
|
+// CHECK:STDERR: fail_export_in_impl.impl.carbon:[[@LINE+8]]:1: error: `export` is only allowed in API files [ExportFromImpl]
|
|
|
// CHECK:STDERR: export import library "base";
|
|
|
// CHECK:STDERR: ^~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
+// CHECK:STDERR: fail_export_in_impl.impl.carbon:[[@LINE+4]]:1: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
|
|
|
+// CHECK:STDERR: export import library "base";
|
|
|
+// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR:
|
|
|
export import library "base";
|
|
|
|
|
|
// Note the import still occurs.
|
|
|
@@ -317,53 +321,7 @@ var indirect_c: C = {.x = ()};
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_export_in_impl.impl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
|
|
|
-// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %empty_tuple.type} [template]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.x [template]
|
|
|
-// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
|
|
|
-// CHECK:STDOUT: %C.val: %C = struct_value (%empty_tuple) [template]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref Main//base, C, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.2: <witness> = import_ref Main//base, loc6_1, loaded [template = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %import_ref.3 = import_ref Main//base, inst14 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %import_ref.4 = import_ref Main//base, loc5_8, unloaded
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = imports.%import_ref.1
|
|
|
-// CHECK:STDOUT: .c = %c
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
|
|
-// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
|
|
-// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %c.var: ref %C = var c
|
|
|
-// CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @C [from "base.carbon"] {
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = imports.%import_ref.3
|
|
|
-// CHECK:STDOUT: .x = imports.%import_ref.4
|
|
|
-// CHECK:STDOUT: complete_type_witness = imports.%import_ref.2
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @__global_init() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal ()
|
|
|
-// CHECK:STDOUT: %.loc11_20.1: %struct_type.x = struct_literal (%.loc11_19.1)
|
|
|
-// CHECK:STDOUT: %.loc11_20.2: ref %empty_tuple.type = class_element_access file.%c.var, element0
|
|
|
-// CHECK:STDOUT: %.loc11_19.2: init %empty_tuple.type = tuple_init () to %.loc11_20.2 [template = constants.%empty_tuple]
|
|
|
-// CHECK:STDOUT: %.loc11_20.3: init %empty_tuple.type = converted %.loc11_19.1, %.loc11_19.2 [template = constants.%empty_tuple]
|
|
|
-// CHECK:STDOUT: %.loc11_20.4: init %C = class_init (%.loc11_20.3), file.%c.var [template = constants.%C.val]
|
|
|
-// CHECK:STDOUT: %.loc11_21: init %C = converted %.loc11_20.1, %.loc11_20.4 [template = constants.%C.val]
|
|
|
-// CHECK:STDOUT: assign file.%c.var, %.loc11_21
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: file {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- export_export.impl.carbon
|
|
|
// CHECK:STDOUT:
|