diff options
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/property-int-cast.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/generics/property-int-cast.vala b/tests/generics/property-int-cast.vala new file mode 100644 index 000000000..69478efd3 --- /dev/null +++ b/tests/generics/property-int-cast.vala @@ -0,0 +1,12 @@ +class Foo<G> { + public G prop { get; private set; } + + public Foo (G g) { + prop = g; + } +} + +void main() { + var foo = new Foo<int> (23); + assert (foo.prop == 23); +} |