Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeCheckDeclOverride] Add Fix-Its to "override" mismatch #34003

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

woshiccm
Copy link

@woshiccm woshiccm commented Sep 20, 2020

Resolves SR-13388

Add Fix-Its to "override" mismatch

For code like this following:

class Base {
  func foo(a: Int, b: Int) {}
}
class C: Base {
  override func foo(a: Int) {} // error: method does not override any method from its superclass
}

we should provide a Fix-It that adds ", b: Int" to C.foo.

@woshiccm
Copy link
Author

woshiccm commented Sep 20, 2020

CC @slavapestov @xedin

@woshiccm woshiccm force-pushed the add-fix-Its-to-override-mismatch branch 3 times, most recently from a028c2e to e388a81 Compare September 21, 2020 08:41
@woshiccm woshiccm force-pushed the add-fix-Its-to-override-mismatch branch from f4c8e03 to 77341fc Compare September 21, 2020 09:09
Copy link
Author

@woshiccm woshiccm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theblixguy Could you help to review,thx.

lib/Sema/TypeCheckDeclOverride.cpp Show resolved Hide resolved
test/decl/class/override.swift Outdated Show resolved Hide resolved
@shahmishal
Copy link
Member

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

  • How to change the base branch: (Link)
  • More detail about the branch update: (Link)

@woshiccm woshiccm changed the base branch from master to main October 2, 2020 07:37
@woshiccm
Copy link
Author

woshiccm commented Oct 2, 2020

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

  • How to change the base branch: (Link)
  • More detail about the branch update: (Link)

Thx, done.

@woshiccm
Copy link
Author

woshiccm commented Oct 13, 2020

@DougGregor @slavapestov Could you help to review?

@LucianoPAlmeida
Copy link
Contributor

cc @CodaFi @AnthonyLatsis
Maybe they can help you review this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants