magic-lang / magic

0 stars 2 forks source link

case doesn't need brackets #120

Open davidhesselbom opened 9 years ago

davidhesselbom commented 9 years ago

For example,

        match type {
            case TextureType monochrome =>
                this internalFormat = GL_R8
                this format = GL_RED
                this _bytesPerPixel = 1
            case TextureType rgba =>

works just fine, so magic should warn about unnecessary brackets in

        match type {
            case TextureType monochrome => {
                this internalFormat = GL_R8
                this format = GL_RED
                this _bytesPerPixel = 1
            }
            case TextureType rgba =>

and so on because brackets are ugly.

davidhesselbom commented 8 years ago

Any ETA on this?