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

Abstract wrapping extern cannot find the extern #1099

Open
singpolyma opened this issue Mar 25, 2024 · 0 comments
Open

Abstract wrapping extern cannot find the extern #1099

singpolyma opened this issue Mar 25, 2024 · 0 comments

Comments

@singpolyma
Copy link

Example:

@:include("rtc/rtc.hpp")
@:native("rtc::Description::Type")
extern enum abstract DescriptionType(Int) {
	 var Unspec;
	 var Offer;
	 var Answer;
	 var Pranswer;
	 var Rollback;
}

abstract SdpType(DescriptionType) to DescriptionType from DescriptionType {
	public static var OFFER = DescriptionType.Offer;
	public static var PRANSWER = DescriptionType.Pranswer;
	public static var ANSWER = DescriptionType.Answer;
	public static var ROLLBACK = DescriptionType.Rollback;
}

I get error:

error: ‘rtc’ has not been declared
  127 | HXDLIN(  68)            ROLLBACK = rtc::Description::Type::Rollback;

This seems to be because a new file is generated for this class, but the includes for the extern are not brought across. I tried also adding @:headerInclude for the abstract, but it seems that is ignored.

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