swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
370 stars 47 forks source link

unexpected switch-case indent #134

Closed hex2010 closed 7 years ago

hex2010 commented 7 years ago

I got some unexpected indent in switch-case block, with Swift Mode:Switch Case Offset set to 0, in version 20161002.506 (melpa):

       switch any {
        case foo:
            break;
        case bar:
        case is ():
            if(!st.writeValue(flag | cNil) ||
                   !_writeName(st, flag) ) {
                return false
            }
            case let x as Bool:
                if(!st.writeValue(flag | (x ? cTrue : cFalse)) ||
                       !_writeName(st, flag) ) {
                    return false
                }
                case let x as Ref:
                    if(!st.writeValue(flag | cObject)  ||
                           !_writeName(st, flag) ||
                           !st.writeUvarint(x.value)) {
                        return false
                    }

Is this a BUG?

switch-case-indent

taku0 commented 7 years ago

This is a bug. I'll investigate it.

taku0 commented 7 years ago

Fixed. Thanks for reporting.