diff --git a/analyzer/type-section_test.go b/analyzer/type-section_test.go index 9bfc84f..eca78e8 100644 --- a/analyzer/type-section_test.go +++ b/analyzer/type-section_test.go @@ -37,5 +37,9 @@ typeSection ro ../tests/analyzer/typeSection.fInheritObjectFromOther member ro beak type 1 basic Int arg uint 238 +typeSection ro ../tests/analyzer/typeSection.gPointer + type 1 pointer {Int} +typeSection ro ../tests/analyzer/typeSection.hDynamicArray + type 1 dynamicArray {Int} `, test) } diff --git a/analyzer/type.go b/analyzer/type.go index d490c91..e8846c7 100644 --- a/analyzer/type.go +++ b/analyzer/type.go @@ -53,7 +53,7 @@ func (what Type) ToString (indent int) (output string) { case TypeKindPointer: output += " pointer" case TypeKindVariableArray: - output += " variableArray" + output += " dynamicArray" } if what.points != nil { diff --git a/tests/analyzer/typeSection/main.arf b/tests/analyzer/typeSection/main.arf index 3416a9b..b53c701 100644 --- a/tests/analyzer/typeSection/main.arf +++ b/tests/analyzer/typeSection/main.arf @@ -19,4 +19,8 @@ type ro fInheritObjectFromOther:required.bBird ro wing 2 ro beak:Int 238 +type ro gPointer:{Int} + +type ro hDynamicArray:{Int ..} + # TODO: test a type that has a member pointing to itself