fix: don't generate code for decls with an implemented_by attribute (#6680)

This PR makes the new code generator skip generating code for decls with
an implemented_by decl, just like the old code generator.
This commit is contained in:
Cameron Zwarich 2025-01-20 18:06:41 -08:00 committed by GitHub
parent 4935829abe
commit e3771e3ad6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,7 @@ def shouldGenerateCode (declName : Name) : CoreM Bool := do
let some info ← getDeclInfo? declName | return false
unless info.hasValue (allowOpaque := true) do return false
if hasMacroInlineAttribute env declName then return false
if (getImplementedBy? env declName).isSome then return false
if (← Meta.isMatcher declName) then return false
if isCasesOnRecursor env declName then return false
-- TODO: check if type class instance