"Implicit braces are forbidden" triggered with function call in class body #68

Closed
delaaxe opened this Issue Oct 30, 2012 · 3 comments

Projects

None yet

4 participants

@delaaxe
delaaxe commented Oct 30, 2012

this valid coffeescript triggers the wrong error when calling a function in class body:

class A

  @configure(1, 2, 3)

  constructor: ->

pattern used all over the place by the spine framework

edit: that is, with the "no_implicit_braces" set to "error" of course, and which have nothing to do with the preceding example

@swang
Collaborator
swang commented May 12, 2013

I do not get any errors running this piece of code when I set no_implicit_braces to ERROR. Does this still happen?

@Nocturnis

I still get this error (or a similar one) when defining helper functions or private static variables inside of a class declaration:

class Foo
  _defaultC = 5

  constructor: (a) ->
    @c = a ? _defaultC

CoffeeLint reports that implicit braces are forbidden on the line containing 'constructor.'

@AsaAyers
Collaborator

I'm unable to reproduce the problem. I committed both code samples to the no_implicit_parens rule and the build is passing locally and on TravisCI

I'm going to go ahead and close this as I can't reproduce the error. My only other idea is that maybe you don't have a current version?

@AsaAyers AsaAyers closed this Oct 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment