mtouch에서 이상한 동작이 발생했습니다. 나는 AOT가 특정 상황에서 실패 할 수 있다는 것을 알고 있지만,이 문제는 조금 다르다고 생각합니다. 할 경우 다른 곳에 다음, 이제mtouch AOT 누락 된 컴파일
public class TTableCell
{
}
public class TTableElement<T>
where T: TTableElement<T>
{
public void SetProperty<TV> (ref TV backingStorage, string propName, TV value)
{
backingStorage = value;
}
}
public class TAbstractTableItem<TC> : TTableElement<TAbstractTableItem<TC>>
where TC : TTableCell
{
public TAbstractTableItem()
{
}
string _string;
bool _bool;
public void DoException()
{
SetProperty (ref _string, "String", "Bla bla");
SetProperty (ref _bool, "Boolean", false);
}
}
:
TTableItem<TTableCell> item = new TTableItem<TTableCell>();
item.DoException();
내가 예외를 얻을 : 여기
가 일부 코드의 지금
Unhandled managed exception: Attempting to JIT compile method 'TouchSandbox.TTableElement`1<TouchSandbox.TAbstractTableItem`1<TouchSandbox.TTableCell>>:SetProperty<bool> (bool&,string,bool)'
을의 통지의 부울 버전에서만 예외가 발생합니다., 문자열 하나가 아닙니다. 내 프로젝트에서는 다양한 유형의 메소드 (사용자 정의 유형도)를 사용하며이 문제는 bool에서만 발생합니다.
아무도 도와 줄 수 있습니까?
감사
세르지오
P.S. 분명히이 문제는의 iDevice 만 (하지 시뮬레이터)
UPDATE에 존재
좋아, 자 마린의 버그질라에 약간의 검색이 나는 티켓 (실제로는 조금 오래된!) 부족에서 강조 발견 후 mtouch AOT : Bug 2096. 슬프게도, 그들은 아직 고치지 않는 것 같다!
어쨌든, 고마워 ... 사실 나는 다른 값 유형 (int, float, DateTime)으로 시도해 보았고 관련이있는 것으로 보입니다. – Atropo
예, 값 유형과 관련되어 있습니다. 수업은 잘 작동합니다. –