Skip to content

Conversation

@smarter
Copy link
Member

@smarter smarter commented Dec 18, 2014

This supersedes #273.
Review by @odersky .

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the logic can be simplified and made clearer as follows:

case _ => 
    names exists { n =>
       n == "all" || {
          val strippedName = name.stripSuffix("+")
          val indicatedPhase = if (name == strippedName) phase else phase.prev
          indicatedPhase.phaseName.startsWith(strippedName)
      }
   }  

Copy link
Member Author

Choose a reason for hiding this comment

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

No, that doesn't work, if we have a "+" we want to match on both phase and phase.prev, we could use a list but that seems overkill, what do you think of:

case _ => 
    names exists { n =>
       n == "all" || {
          val strippedName = name.stripSuffix("+")
          val logNextPhase = name ne strippedName
          phase.phaseName.startsWith(strippedName) ||
            (logNextPhase && phase.prev.phaseName.startsWith(strippedName))
      }
   }

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I thought of a different spec. But yours makes more sense, I think. The change looks good.

@odersky
Copy link
Contributor

odersky commented Dec 18, 2014

Otherwise LGTM

@smarter
Copy link
Member Author

smarter commented Dec 18, 2014

Should be good to be merged now.

odersky added a commit that referenced this pull request Dec 18, 2014
-Ylog:X now only log phase X, use -Ylog:X+ to also log phase X+1
@odersky odersky merged commit f3c0eaa into scala:master Dec 18, 2014
tgodzik added a commit to tgodzik/scala3 that referenced this pull request Apr 29, 2025
Backport "Restore resolving prefixes of implicit Ident" to 3.3 LTS
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.

2 participants