Merge pull request #3150 from dunhamsteve/defaulthint-error

[ error ] Fix error message for %defaulthint on a local function
This commit is contained in:
André Videla 2023-11-28 11:28:57 +00:00 committed by GitHub
commit 737a2d96dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,9 @@ processFnOpt fc _ ndef (Hint d)
addLocalHint ndef
processFnOpt fc True ndef (GlobalHint a)
= addGlobalHint ndef a
processFnOpt fc _ ndef (GlobalHint a)
processFnOpt fc _ ndef (GlobalHint True)
= throw (GenericMsg fc "%defaulthint is not valid in local definitions")
processFnOpt fc _ ndef (GlobalHint False)
= throw (GenericMsg fc "%globalhint is not valid in local definitions")
processFnOpt fc _ ndef ExternFn
= setFlag fc ndef Inline -- if externally defined, inline when compiling