Skip to content

Commit

Permalink
Make overrides inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Oct 10, 2024
1 parent 0041073 commit 023b508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/steps/quoted/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package steps.quoted

import scala.quoted.*

extension(using Quotes)(cls: quotes.reflect.Symbol)
extension(using Quotes)(inline cls: quotes.reflect.Symbol)

/** Check if a given class, trait or object overrides a given definition
*
* @param cls The class, trait or object to inspect
* @param sym The symbol that should be overriden
* @return true if the definition is overriden, false otherwise
*/
def overrides(sym: quotes.reflect.Symbol): Boolean =
inline def overrides(inline sym: quotes.reflect.Symbol): Boolean =
sym.overridingSymbol(cls).exists

end extension

0 comments on commit 023b508

Please sign in to comment.