-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static parameters example in the manual is not working as expected. Compilation should fail but it is not. #21404
Labels
Comments
see #21181 |
!nim c type
Number = int32 or float32
Matrix[M,N: static int; T: Number] = array[0..(M*N - 1), T]
AffineTransform2D[T] = Matrix[3, 3, T]
AffineTransform3D[T] = Matrix[4, 4, T]
var m1: AffineTransform3D[float]
var m2: AffineTransform2D[string] |
@juancarlospaco (contributor) devel :+1: OKOutput
Stats
stable :+1: OKOutput
Stats
1.6.0 :+1: OKOutput
Stats
1.4.0 :+1: OKOutput
Stats
1.2.0 :+1: OKOutput
Stats
1.0.0 :+1: OKOutput
Stats
41 minutes bisecting 6 commits at 0 commits per second.
|
metagn
added
Generics
Invalid Code Acceptance
Everything related to compiler not complaining about invalid code
labels
Aug 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
I have taken this example for static parameters from the manual but it is not working as expected.
It seems the type class (Number) constraints on the value type of the matrices in the example are not working:
Nim Version
Nim Compiler Version 1.9.1 [Linux: amd64]
Compiled at 2023-02-20
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: e896977
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: