mockingbird icon indicating copy to clipboard operation
mockingbird copied to clipboard

Fix parsing async keywords in void methods

Open andrewchang-bird opened this issue 4 years ago • 1 comments

Overview

Methods returning Void implicitly aren’t parsed correctly for declaration keywords like throws and async which can lead to malformed code if the method body contains “async.”

func notAsync() {
  DispatchQueue.main.async {}
}

Test Plan

Added an additional test case to check for async false positives.

andrewchang-bird avatar Jan 29 '22 00:01 andrewchang-bird

This is great, possible to get it merged? We have several void async methods in our codebase

jacobhzen avatar Apr 15 '22 20:04 jacobhzen