Skip to content

Commit 82dae60

Browse files
committed
Add checks for String::create with length 0
1 parent ac350b0 commit 82dae60

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/regression/Issue849/Main.hx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,15 @@ function main() {
77

88
// char16_t
99
trace(untyped __cpp__('::String::create(u"Hello world")'));
10+
11+
// explicit 0 length
12+
13+
// char
14+
trace(untyped __cpp__('::String::create("Hello world", 0)'));
15+
16+
// wchar_t
17+
trace(untyped __cpp__('::String::create(L"Hello world", 0)'));
18+
19+
// char16_t
20+
trace(untyped __cpp__('::String::create(u"Hello world", 0)'));
1021
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
Main.hx:3: Hello world
22
Main.hx:6: Hello world
33
Main.hx:9: Hello world
4+
Main.hx:14:
5+
Main.hx:17:
6+
Main.hx:20:

0 commit comments

Comments
 (0)