SD8 will crash in the following 2 scenarios (I suspect they are related). Apple’s Script Editor does not experience any issues.
SD8 build 8A19, on macOS 11.2.1 (Intel).
Script library containing a property referring to
me and at least 1 handler.
property p: me on f() return "foo" end
use someLibrary: script "someLibrary" # Causes crash on opening the script.
Why is this a useful pattern? In complex script objects, it is sometime necessary to have a property to reference the anonymous top-level script object (see AppleScript: The Definitive Guide, 2e by Matt Neuberg). Having a such a property in the script library allows for delegation patterns.
use statement followed by setting the parent of the script.
on f() return "foo" end
use someLibrary: script "someLibrary" property parent: someLibrary # Causes crash on compilation.
This is mainly useful as a means of caveman debugging when developing script libraries.