when you
This commit is contained in:
parent
52727a1996
commit
1300f87cb5
@ -5,6 +5,6 @@ import "testing"
|
|||||||
func TestTypeSection (test *testing.T) {
|
func TestTypeSection (test *testing.T) {
|
||||||
checkTree ("../tests/analyzer/typeSection", false,
|
checkTree ("../tests/analyzer/typeSection", false,
|
||||||
`typeSection ../tests/analyzer/typeSection.basicInt
|
`typeSection ../tests/analyzer/typeSection.basicInt
|
||||||
type basic Int
|
type 1 basic Int
|
||||||
`, test)
|
`, test)
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,8 @@ func (analyzer AnalysisOperation) analyzeType (
|
|||||||
err error,
|
err error,
|
||||||
) {
|
) {
|
||||||
outputType.mutable = inputType.Mutable()
|
outputType.mutable = inputType.Mutable()
|
||||||
if inputType.Length() < 1 {
|
outputType.length = inputType.Length()
|
||||||
|
if outputType.length < 1 {
|
||||||
err = inputType.NewError (
|
err = inputType.NewError (
|
||||||
"cannot specify a length of zero",
|
"cannot specify a length of zero",
|
||||||
infoerr.ErrorKindError)
|
infoerr.ErrorKindError)
|
||||||
|
Reference in New Issue
Block a user