Improve a contract.fail error message

This commit is contained in:
joeduffy 2017-05-01 09:46:59 -07:00
parent 553462bbfd
commit 815aa26282

View file

@ -3091,7 +3091,8 @@ export class Transformer {
case ts.SyntaxKind.StringLiteral:
return this.withLocation(node, ident((<ts.StringLiteral>node).text));
default:
return contract.fail("Property names other than identifiers and string literals not yet supported");
return contract.fail(
`Only identifiers and string literal property names supported; got '${ts.SyntaxKind[node.kind]}'`);
}
}
}