Skip to content

Commit b7ba524

Browse files
committed
Add a test case for non-ascii module names.
With the old remangler this test crashed at runtime when trying to create the mangled name for a class with a non-ascii module name. rdar://problem/31875699
1 parent 18ee639 commit b7ba524

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/stdlib/UnicodeMetadata.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-build-swift -module-name="日本語01" %s -o %t.out
2+
// RUN: %target-run %t.out | %FileCheck %s
3+
// REQUIRES: executable_test
4+
5+
6+
class myClass { }
7+
8+
// Check that the runtime doesn't crash when generating the class name with
9+
// a non-ascii module name.
10+
let array = [ myClass() ]
11+
12+
// CHECK: [日本語01.myClass]
13+
print(array)

0 commit comments

Comments
 (0)