File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -7676,6 +7676,20 @@ error: unknown unary operator '>'
7676
7676
obj[#]
7677
7677
^
7678
7678
error: unexpected character
7679
+ (1+'').a
7680
+ ^~~~~~
7681
+ error: no overload of '+' accepts the provided types (int,string)
7682
+ note: available overloads:
7683
+ +(string,string)
7684
+ +(float,float)
7685
+ +(float,int)
7686
+ +(int,float)
7687
+ +(int,int)
7688
+ +(float)
7689
+ +(int)
7690
+ ''.a
7691
+ ^~
7692
+ error: expected object, got string
7679
7693
'"
7680
7694
^~
7681
7695
error: unterminated string
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ TEST_CASE("object access", "[object]") {
64
64
CHECK_ERROR (" obj[(]" , vars);
65
65
CHECK_ERROR (" obj[>]" , vars);
66
66
CHECK_ERROR (" obj[#]" , vars);
67
+ CHECK_ERROR (" (1+'').a" , vars);
68
+ CHECK_ERROR (" ''.a" , vars);
67
69
}
68
70
69
71
SECTION (" good" ) {
You can’t perform that action at this time.
0 commit comments