[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git] / mcs / tests / gtest-643.cs
blobdea5a20ceab6973a0eeb68c9e4d5dbbd7563f333
1 using System;
2 using System.Collections.Generic;
4 class Program
6 public static void Main()
10 private static IEnumerable<float> FindIntersections<TVector>(
11 IBezier<TVector> bezier,
12 Ray<TVector> ray,
13 float epsilon,
14 Range<float> t1,
15 int depth) where TVector : IVector<TVector>
17 var bounds = bezier.GetBounds();
18 if (Intersect.s(ray, bounds))
20 var intersections1 = new float[] { };
21 var intersections2 = new float[] { };
22 foreach (var t in intersections1) { yield return t; }
23 foreach (var t in intersections2) { yield return t; }
27 public static class Intersect
29 public static bool s<TVector>(Ray<TVector> ray, BoundingBoxN<TVector> box) where TVector : IVector<TVector>
31 throw new NotImplementedException();
35 public struct Range<T>
39 public class Ray<TVector> where TVector : IVector<TVector>
43 public interface IBezier<TVector>
44 where TVector : IVector<TVector>
46 BoundingBoxN<TVector> GetBounds();
49 public interface IVector<T> : IEpsilonEquatable<T, float>
50 where T : IVector<T>
54 public interface IEpsilonEquatable<TType, TEpsilon> // ReSharper enable TypeParameterCanBeVariant
58 public struct BoundingBoxN<T>
59 where T : IVector<T>