Git Product home page Git Product logo

Comments (7)

c-dante avatar c-dante commented on June 30, 2024

Same lexer bug I pointed out in #260, probably also related to how dangling paren is set up

from scalariform.

oporkka avatar oporkka commented on June 30, 2024

What is the expected result?

from scalariform.

normana400 avatar normana400 commented on June 30, 2024

this is still happening with scalariform. when you are using implicits the space between the word "implicit" and the name of the parameter should not be lost.

in other words (implicit foo : String should not be reformatted to (implicitfoo : String

from scalariform.

godenji avatar godenji commented on June 30, 2024

@normana400 can you provide a code snippet where the formatter breaks code (not just formats oddly) in the way that describe?

from scalariform.

normana400 avatar normana400 commented on June 30, 2024

the above example is broken code. implicit is a language keyword. To have a language keyword get mixed into the name changes the behavior of the code and also creates a compile error with the code that attempts to reference the true (non corrupted) name of the value. Did that answer your question.

The example at the top of the thread should be all you need to reproduce.

from scalariform.

normana400 avatar normana400 commented on June 30, 2024

I think the scenario happens whenever there is an implicit parameter that shares a signature with non implicit parameters

from scalariform.

normana400 avatar normana400 commented on June 30, 2024
class Foo{
  def f(implicit i: Int,
      j: Int): Unit = {
    i
    j
 }
}

from scalariform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.