File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
src/tests/Loader/classloader/regressions/GitHub_82187 Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+ <PropertyGroup >
3+ <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
4+ <OutputType >Exe</OutputType >
5+ </PropertyGroup >
6+ <ItemGroup >
7+ <Compile Include =" repro.cs" />
8+ </ItemGroup >
9+ </Project >
Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ /* Regression test for https://github.com/dotnet/runtime/issues/78638
4+ * and https://github.com/dotnet/runtime/issues/82187 ensure AOT
5+ * cross-compiler and AOT runtime use the same name hashing for names
6+ * that include UTF-8 continuation bytes.
7+ */
8+
9+ [ MySpecial ( typeof ( MeineTüre ) ) ]
10+ public class Program
11+ {
12+ public static int Main ( )
13+ {
14+ var attr = ( MySpecialAttribute ) Attribute . GetCustomAttribute ( typeof ( Program ) , typeof ( MySpecialAttribute ) , false ) ;
15+ if ( attr == null )
16+ return 101 ;
17+ if ( attr . Type == null )
18+ return 102 ;
19+ if ( attr . Type . FullName != "MeineTüre" )
20+ return 103 ;
21+ return 100 ;
22+ }
23+ }
24+
25+ public class MySpecialAttribute : Attribute
26+ {
27+ public Type Type { get ; private set ; }
28+ public MySpecialAttribute ( Type t ) { Type = t ; }
29+ }
30+
31+ public class MeineTüre { }
You can’t perform that action at this time.
0 commit comments