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

@associated_call force Virtual Type #64

Open
TheMarshalMole opened this issue Nov 2, 2022 · 0 comments
Open

@associated_call force Virtual Type #64

TheMarshalMole opened this issue Nov 2, 2022 · 0 comments

Comments

@TheMarshalMole
Copy link

TheMarshalMole commented Nov 2, 2022

Hello,

The @associate_call expects a virtual function. This condition is not well stipulated in the documentation.

The problem is generated by the method: apply_associate_annotations::inherit_annotations
Caused by (as far as I saw): A new type is generated (mock.mock_conf in the example I have presented), which tries to inherit the mock_conf type. Since mock_conf is not virtual, an error is thrown.

Code to reproduce the problem:

  • the following .CAS code could not be compiled:
resource mock_conf  {
	@associated_call
	fn read(domain source) {
		allow(source, this, file, [ read open getattr ]);
	}
	file_context("/home/csandu/Documents", [file dir], this);
}

@associate([mock_conf])
domain mock {
	mock_conf.read(this);
}

Is this the expected behavior? If so, why one should "expect" virtual when using @associated_call(s)?

Thank you for your support,
Cristian Sandu

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