Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

Compile error with generics

$
0
0
What is the current status of generics in scripts?

The following code used to work fine until a recent patch (don't know exactly which since I've been away from SE for a while), and now it fails after closing the editor (the type rewrite/inject phase I think):

Code:
public class MyTuple<T1,T2> {
	private List<T1> first; 
	private List<T2> second;
 
	public MyTuple(T1 a, T2 b) {
		first = new List<T1>(1);
		second = new List<T2>(1);
		first.Add(a); second.Add(b);
	}
 
	public T1 First()...
Compile error with generics

Viewing all articles
Browse latest Browse all 903

Trending Articles