-
Notifications
You must be signed in to change notification settings - Fork 77
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
TC is too strict in TypedVariableBecomes pattern #473
Comments
No, this can never match! List of lists versus sublists. But the error message is confusing. — On Tue, Dec 31, 2013 at 9:39 AM, Paul Klint notifications@github.com
|
well .. it is in the test set :-) Indeed, this particular example (there are more of these) will never match, but it should not give a type error. |
I don't see the problem, is it because it says |
The "problem" (= reason for not matching) is that L is declared with type list[int] |
It isn't just a reason for not matching -- you are declaring |
@mahills you convinced me, this should be a static error; so there is no work involved and we can close this issue. I am still (too much) inclined to assume that a test case is correct, but on the other hand I have already found dozens of type-incorrect tests. |
An issue is that these literals used in tests have a too specific types for testing purposes. Normally you would never know these specific types and normally you would not have such error messages. I saw this has led too more confusion in other tests as well, so please consider this subtlety, because we are not testing the normal rascal programs like this. — On Tue, Dec 31, 2013 at 4:27 PM, Paul Klint notifications@github.com
|
The following gives a type error, but is ok and should only lead to a failure to match certain list elements at runtime:
gives
The text was updated successfully, but these errors were encountered: