コンテンツへスキップ
ものがたり
戻る

GMCS throws exception when compiling struct with pointers inside generic type

もずはっく日記のスタイルをものまねしてみるテスト(w いやこれは同じくらい1日に何件もfixできないとさまにならないんだけどね…

Genericsが関係するとunsafeもNGになったりする。

public class Foo  

{  

  unsafe private struct Node  

  {  

    private Node * left, right;  

    private Node * parent;  

  }  

}

これはOK。でも

public class Foo<T>  

{  

  unsafe private struct Node  

  {  

    private Node * left, right;  

    private Node * parent;  

  }  

}

これはNG。


この記事を共有:

前の記事
error CS1503: Argument 1: Cannot convert from `T' to `T'
次の記事
2005-09-02