diff --git a/src/parse/mixin.rs b/src/parse/mixin.rs index e9868b9..1e3466c 100644 --- a/src/parse/mixin.rs +++ b/src/parse/mixin.rs @@ -17,7 +17,7 @@ use super::{common::ContextFlags, Parser, Stmt}; impl<'a> Parser<'a> { pub(super) fn parse_mixin(&mut self) -> SassResult<()> { self.whitespace(); - let Spanned { node: name, span } = self.parse_identifier()?; + let Spanned { node: name, span } = self.parse_identifier_no_interpolation(false)?; if self.flags.in_mixin() { return Err(("Mixins may not contain mixin declarations.", span).into()); diff --git a/tests/mixins.rs b/tests/mixins.rs index 266a820..5d58f6a 100644 --- a/tests/mixins.rs +++ b/tests/mixins.rs @@ -478,3 +478,14 @@ error!( }", "Error: Mixins may not be declared in control directives." ); +error!( + does_not_allow_interpolation_in_name_of_declaration, + "@mixin n#{a}me { + color: red; + } + + a { + @include name; + }", + "Error: expected \"{\"." +);