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

Compiler shouldn't allow named slots other than at top level inside component #3385

Closed
Conduitry opened this issue Aug 9, 2019 · 1 comment · Fixed by #4509
Closed

Compiler shouldn't allow named slots other than at top level inside component #3385

Conduitry opened this issue Aug 9, 2019 · 1 comment · Fixed by #4509

Comments

@Conduitry
Copy link
Member

Describe the bug
The compiler permits inline components containing named slots that appear inside other elements inside the component. I don't think this means anything or should be allowed. The currently produced code does not behave well.

To Reproduce

<script>
	import Wrapper from './Wrapper.svelte';
</script>

<Wrapper>
	<div>
		<div slot='foo'>
		</div>
	</div>
</Wrapper>

Expected behavior
The compiler throws an exception and refuses to compile this.

Severity
Low

@Conduitry
Copy link
Member Author

In 3.20.0, this is now a compiler error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants