DescriptionFix runtimeType.toString for tear-offs.
Tear-offs are constructed by building a fresh constructor on the fly. However, that constructor is unnamed and didn't have the 'builtin$cls' property set. As such, the runtime-type system was unable to extract a good name and wasn't able to provide a good 'toString' for it. With this CL the constructor has a good 'name' set.
Also removes the 'builtin$cls' property that was a duplicate of 'name'. Whenever we defined a new Dart class, we added a 'builtin$cls' property on the constructor which was a duplicate of the name. This was necessary, because IE doesn't store the function name on the constructor. However, there we can just assign the 'name' field, and don't need to introduce a new field-name ('builtin$cls'). As such, we can always use the 'name' property.
R=sra@google.com
Committed: https://github.com/dart-lang/sdk/commit/87a7ca0720f066c51c6f8884bb93b50183aaabe7
Patch Set 1 #
Total comments: 7
Patch Set 2 : Address comments. #Patch Set 3 : Improved test. #
Messages
Total messages: 8 (1 generated)
|