diff --git a/calyx-frontend/src/attribute.rs b/calyx-frontend/src/attribute.rs index f79542b93..414b0ec59 100644 --- a/calyx-frontend/src/attribute.rs +++ b/calyx-frontend/src/attribute.rs @@ -279,6 +279,11 @@ impl FromStr for Attribute { if DEPRECATED_ATTRIBUTES.contains(&s) { log::warn!("The attribute @{s} is deprecated and will be ignored by the compiler."); } + + if let Ok(SetAttribute::Set(_)) = SetAttribute::from_str(s) { + log::warn!("Set attribute {s} incorrectly written as a standard attribute, i.e. '@{s}(..)' or '\"{s}\" = ..'. This will be ignored by the compiler. Instead write '@{s}{{..}}' or '\"{s}\" = {{..}}'."); + } + // Reject attributes that all caps since those are reserved for internal attributes if s.to_uppercase() == s { return Err(Error::misc(format!("Invalid attribute: {}. All caps attributes are reserved for internal use.", s)));