%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.26.0/input/regression/volta-bracket-warning-end-prematurely.ly"
\sourcefileline 0
\version "2.25.32"

\header {
  texidoc="When a new volta bracket interrupts one that is already in progress,
a warning is issued.  In this case, two voices differ in the extent of the first
alternative, although they agree on the extent of the second alternative and
they even unfold to the same length."
}

#(ly:set-option 'warning-as-error #t)

#(ly:expect-warning
  (ly:translate-cpp-warning-scheme
   "already have a VoltaBracket; ending it prematurely"))

voiceA = {
  \repeat volta 2 {
    c''1
    \alternative {
      \volta 1 { 1 1 }
      \volta 2 { 1 }
    }
  }
  1
}

voiceB = {
  \repeat volta 2 {
    a'1
    1
    \alternative {
      \volta 1 { 1 }
      \volta 2 { 1 }
    }
  }
}

shared = << \voiceA \\ \voiceB >>

\score { \new Staff \with { instrumentName = "A" } \voiceA }
\score { \new Staff \with { instrumentName = "B" } \voiceB }
\score {
  \new Staff \with { instrumentName = \markup \column { A B } } \shared
}
\score {
  \new Staff \with { instrumentName = "unfolded" } \unfoldRepeats \shared
}



% ****************************************************************
% end ly snippet
% ****************************************************************
