diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-07-05 15:51:04 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-05 15:51:04 +0200 |
commit | 0926754e68861947c67986bc9c7e0a011a58267b (patch) | |
tree | bc11469a33f1aabd202e7105177553688439712a /tests/generics | |
parent | 9b31f6785947974e89d46bbc0dee11f1c78754dc (diff) | |
download | Nim-0926754e68861947c67986bc9c7e0a011a58267b.tar.gz |
make tests green again
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/t5643.nim | 2 | ||||
-rw-r--r-- | tests/generics/tcan_inherit_generic.nim | 2 | ||||
-rw-r--r-- | tests/generics/tgenericprop.nim | 4 | ||||
-rw-r--r-- | tests/generics/tparam_binding.nim | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/generics/t5643.nim b/tests/generics/t5643.nim index 962d5cef5..f303bbc70 100644 --- a/tests/generics/t5643.nim +++ b/tests/generics/t5643.nim @@ -1,5 +1,5 @@ type - Matrix*[M, N: static[int], T: SomeReal] = object + Matrix*[M, N: static[int], T: SomeFloat] = object data: ref array[N * M, T] Matrix64*[M, N: static[int]] = Matrix[M, N, float64] diff --git a/tests/generics/tcan_inherit_generic.nim b/tests/generics/tcan_inherit_generic.nim index 331fcfd5c..69e06c4a5 100644 --- a/tests/generics/tcan_inherit_generic.nim +++ b/tests/generics/tcan_inherit_generic.nim @@ -4,7 +4,7 @@ ## Created by Eric Doughty-Papassideris on 2011-02-16. type - TGen[T] = object of TObject + TGen[T] = object of RootObj x, y: T TSpef[T] = object of TGen[T] diff --git a/tests/generics/tgenericprop.nim b/tests/generics/tgenericprop.nim index 7cddf5617..21ffdf289 100644 --- a/tests/generics/tgenericprop.nim +++ b/tests/generics/tgenericprop.nim @@ -1,11 +1,11 @@ type - TProperty[T] = object of TObject + TProperty[T] = object of RootObj getProc: proc(property: TProperty[T]): T {.nimcall.} setProc: proc(property: TProperty[T], value: T) {.nimcall.} value: T -proc newProperty[T](value: TObject): TProperty[T] = +proc newProperty[T](value: RootObj): TProperty[T] = result.getProc = proc (property: TProperty[T]) = return property.value diff --git a/tests/generics/tparam_binding.nim b/tests/generics/tparam_binding.nim index 55acb8f06..cd0d58e02 100644 --- a/tests/generics/tparam_binding.nim +++ b/tests/generics/tparam_binding.nim @@ -4,7 +4,7 @@ discard """ """ type - Matrix[M,N: static[int]; T: SomeReal] = distinct array[0..(M*N - 1), T] + Matrix[M,N: static[int]; T: SomeFloat] = distinct array[0..(M*N - 1), T] let a = new Matrix[2,2,float] let b = new Matrix[2,1,float] |