-
Notifications
You must be signed in to change notification settings - Fork 1.5k
C++ interop: add a simple unit test for "using enum" #6278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The test currently simply tests one using enum on global scope. |
|
If this is for the "using enum support" item in the toolchain tasks document, that's talking about the C++20 enum class A { x, y };
// Cannot name `A::x` as simply `x` here.
using enum A;
// Can now name `A::x` as simply `x`.
A a = x;The |
thanks, I'll update it. |
Ok, I'm not sure what should be tested here actually. let a : cpp.Foo = SomeValue; (instead of cpp.Foo.SomeValue) ? |
It should be possible to write let a: Cpp.Foo = Cpp.SomeValue;instead of |
This unit test uses the C++20 "using enum SomeEnum;" and imports that into Carbon.
601ae1d to
410a62b
Compare
zygoloid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
@zygoloid does the "Carbon Language - Toolchain tasks" document have to be updated ? Who is taking care of this ? |
|
Thanks for the reminder, done. |
This unit test uses "using UEnum = Enum;" and imports that into Carbon.
This is my very first try at contributing something to carbon, I'm looking forward to your feedback.
The test is very basic.
What other cases should it test ?
What other comments do you have ?