back2dos/tinkerbell — pull request #36 by misprintt (2012-10-24 03:06:39+00:00)
Title: TypeTools.asTypePath - remove duplication when name == sub

In some cases TypeTools.asTypePath returns a path where sub and name are the same. It is valid code, but adds a lot of clutter when printing out types.

It doesn't always happen, and is tricky to isolate, but I've seen this a lot when working when converting ClassFields to Fields, especially with types defined in StdTypes (e.g. String, Bool, Int, etc)

which means that printing a field that should look like

function foo():String

looks like this instead

function foo():String.String

This line patch sets sub to null if it is the same as name