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

Error on multiple function inheritance. #621

Closed
gallandarakhneorg opened this issue Mar 28, 2017 · 3 comments
Closed

Error on multiple function inheritance. #621

gallandarakhneorg opened this issue Mar 28, 2017 · 3 comments

Comments

@gallandarakhneorg
Copy link
Member

gallandarakhneorg commented Mar 28, 2017

Let the SARL code:

private static class SynchronizedSetWrapper<E>
     extends SynchronizedCollectionWrapper<E>
     implements SynchronizedSet<E> {
}

The following error is output by the SARL compiler:

The type EmptySet inherits multiple implementations of the method splite
rator() from Iterable and Collection.
@gallandarakhneorg gallandarakhneorg added this to the 0.6 milestone Mar 28, 2017
@gallandarakhneorg gallandarakhneorg changed the title Error on multiple function inherante. Error on multiple function inheritance. Mar 28, 2017
@gallandarakhneorg
Copy link
Member Author

See Issue in Xtend.

@gallandarakhneorg
Copy link
Member Author

gallandarakhneorg commented Mar 29, 2017

The temporary workaround until the fix in Xtend is:

		override spliterator : Spliterator<E> {
			(this as SynchronizedSet<E>).spliterator
		}

The current object is casted to the SynchronizedSet because it provides the closest definition of spliterator from the call into the hierarchy call. This approach is compliant with the Java compiler resolution.

@gallandarakhneorg
Copy link
Member Author

PR in Xtend is discussed here.

gallandarakhneorg added a commit that referenced this issue Oct 24, 2017
see #621

Signed-off-by: Stéphane Galland <galland@arakhne.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant