@stilakid You should change name of file main.swift and you got no error for 'main attribute can't be used in module that contains top-level code.'
Topic:
Programming Languages
SubTopic:
Swift
Tags: