Swift Playground compiler crashes when arbitrary function is annotated with @inlinable

Originator:pepik.ml
Number:rdar://FB7719603 Date Originated:5/31/2020
Status:Open Resolved:
Product:Swift Playground Product Version:
Classification:Incorrect/Unexpected behavior Reproducible:Always
 
* Please describe the issue:
When using Swift Playgrounds app (both on macOS and iPad), the application fails to run playground page if it contains function annotated with @inlinable. The app itself won't crash but the compiler will. Console.app on macOS is full of crash reports. It's hard to find why the page won't run because playgrounds will not mark problematic part of the code.
Please list the steps you took to reproduce the issue:
Create an empty playground on iPad or macOS and write function annotated with @inlinable, for example:

@inlinable
func thisShouldWork() {

}

Then click on 'Run My Code'

* What did you expect to happen?
The app will compile and run given code.

* What actually happened?
The compiler fails to compile the code and crashes. The app continues to run and shows 'There was a problem running this page.' error modal. Note that annotating variables inside struct works and compiles.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!