Пример #1
0
 public override CST.InvalidInfo ImplementableTypeRef(MessageContext ctxt, CST.RootEnvironment rootEnv, CST.TypeRef typeRef)
 {
     var s = typeRef.Style(rootEnv);
     if (s is CST.UnmanagedPointerTypeStyle)
     {
         Log(new CST.InvalidTypeRef(ctxt, typeRef, "Unmanaged pointers are not supported"));
         return new CST.InvalidInfo(CST.MessageContextBuilders.Type(Global, typeRef));
     }
     return null;
 }
Пример #2
0
 private void CheckTypeIsImportableExportable(MessageContext ctxt, CST.MethodEnvironment methEnv, CST.TypeRef type)
 {
     var s = type.Style(methEnv);
     if (s is CST.UnmanagedPointerTypeStyle)
     {
         env.Log(new InvalidInteropMessage(ctxt, "Cannot import/export unmanaged pointers"));
         throw new DefinitionException();
     }
     if (s is CST.CodePointerTypeStyle)
     {
         env.Log(new InvalidInteropMessage(ctxt, "Cannot import/export code pointers"));
         throw new DefinitionException();
     }
 }