[2020-02] Avoid following invalid pointers in mono_w32process_get_modules on Darwin...
[mono-project.git] / mono / tests / assembly-dep-simplename.cs
blob95c1d9ea22d596496df3a67ac5092848a5a1f27b
1 using System;
3 using System.Runtime.CompilerServices;
5 // This class references "AClass.X" which comes from
6 // assembly-load-dir1/LibSimpleName.dll at compile time (see the Makefile)
7 // but which will be resolved by assembly-load-dir2/libsimplename.dll at runtime.
8 public class MidClass
10 public MidClass ()
12 X = Foof ();
15 // The NoInlining here is an attempt to control precisely when the
16 // reference to the LibSimpleName assembly is going to be resolved.
17 [MethodImpl(MethodImplOptions.NoInlining)]
18 public static int Foof()
20 var a = new AClass ();
21 return a.X;
24 public int X;