Improve a contract.fail error message
This commit is contained in:
parent
553462bbfd
commit
815aa26282
1 changed files with 2 additions and 1 deletions
|
@ -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]}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue