Skip to content
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

源码请教 #2246

Open
xixi911 opened this issue Dec 29, 2023 · 0 comments
Open

源码请教 #2246

xixi911 opened this issue Dec 29, 2023 · 0 comments

Comments

@xixi911
Copy link

xixi911 commented Dec 29, 2023

union Data {
	String s;
	ShortString ss;
	Number n;
	ObjectData o;
	ArrayData a;
	Flag f;
};对于Data这个union,为什么可以通过data的Flag判断类型后,再去获取data中特定的类型信息,原则上union不是只能存储一种类型吗,我看最原始的版本flag和data是分开的。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant