aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/submodules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/submodules.cpp')
-rw-r--r--test/Modules/submodules.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/Modules/submodules.cpp b/test/Modules/submodules.cpp
index 1b4f5d886e3b..9c62389eadc0 100644
--- a/test/Modules/submodules.cpp
+++ b/test/Modules/submodules.cpp
@@ -7,8 +7,9 @@
vector<int> vi;
// Note: remove_reference is not visible yet.
-remove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \
-// expected-error{{expected unqualified-id}}
+remove_reference<int&>::type *int_ptr = 0; // expected-error{{declaration of 'remove_reference' must be imported from module 'std.type_traits' before it is required}}
+// expected-note@Inputs/submodules/type_traits.h:2{{previous}}
+// expected-note@Inputs/submodules/hash_map.h:1{{previous}}
@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
@@ -20,10 +21,16 @@ remove_reference<int&>::type *int_ptr2 = 0;
@import std; // import everything in 'std'
// hash_map still isn't available.
-hash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \
-// expected-error{{expected unqualified-id}}
+hash_map<int, float> ints_to_floats; // expected-error{{declaration of 'hash_map' must be imported from module 'std.hash_map' before it is required}}
@import std.hash_map;
hash_map<int, float> ints_to_floats2;
+@import import_self.b;
+extern MyTypeA import_self_test_a; // expected-error {{must be imported from module 'import_self.a'}}
+// expected-note@import-self-a.h:1 {{here}}
+extern MyTypeC import_self_test_c;
+// FIXME: This should be valid; import_self.b re-exports import_self.d.
+extern MyTypeD import_self_test_d; // expected-error {{must be imported from module 'import_self.d'}}
+// expected-note@import-self-d.h:1 {{here}}