exercism / elixir-analyzer

GNU Affero General Public License v3.0
30 stars 32 forks source link

private function misidentified as public macro #319

Closed nbirnel closed 2 years ago

nbirnel commented 2 years ago

Repro:

This code:

  defp upcase?(str) do
      String.downcase(str) != str and String.upcase(str) == str
  end

Generates this analysis:

# you defined the following public function

defmacro is_upcase?(_)

# make it private like this

defmacrop is_upcase?(_)

This is in https://exercism.org/tracks/elixir/exercises/bob

angelikatyborska commented 2 years ago

Hi! Can you please post your full solution to Bob that produced this comment? The comment you posted is not triggered by just the snippet you posted, there has to be something else in the solution.

nbirnel commented 2 years ago

My apologies; I had an unused defmacro is_upcase?/1 after all. Not a bug; closing this.