Character literal substrings used as arguments were causing asserts. This
happened when the code was trying to get the DynamicType of the substring. We
were only recording the DynamicType of the Designator on which the substring
was based. For character literal substrings, the Designator was a character
literal, and we weren't handling getting its type.
I fixed this by changing the GetType() method for DynamicType to check to
see if we were getting the type of a Substring and calling the GetType()
method of Substring in that case. This required adding a GetType() method
to the Substring class. This, in turn, required modifying the Substring
constructors to take the kind of the base substring as an argument.
I also changed the test resolve49.f90 with some tests, one of which causes
the original crash.
Why does Substring need to have an explicit kind value -- can't this always be determined by the type of the parent string?