diff options
author | laurentlb <laurentlb@google.com> | 2017-07-07 06:58:45 -0400 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-07-07 07:09:05 -0400 |
commit | 9e54088754a8fbe1b73c02e7e25e8f46c44bc7d5 (patch) | |
tree | e6b2f59bb776a534c5e31908c21b5665f0a6bfea /src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java | |
parent | 12a6a7a7536b063f923d53eb9f6c244849b69fc5 (diff) |
Improve error message when calling a builtin function with wrong type
Error message is simpler and doesn't show the type of all arguments.
RELNOTES: None.
PiperOrigin-RevId: 161187134
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java index 1f77337ff2..6e4a576671 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java @@ -337,9 +337,8 @@ public class SkylarkIntegrationTest extends BuildViewTestCase { "str", "\t\tstr.index(1)" + System.lineSeparator() - + "method string.index(sub: string, start: int, end: int or NoneType) is not " - + "applicable for arguments (int, int, NoneType): 'sub' is 'int', " - + "but should be 'string'"); + + "argument 'sub' has type 'int', but should be 'string'\n" + + "in call to builtin method string.index(sub, start, end)"); } @Test |