Grigorii Kirgizov
54fc91a031
Fix and reenable 3 tests on incremental typechecking disabled in fa7532f3, enable few older tests for previously missing bl machinery
2020-02-05 12:29:33 +03:00
Fedor Isakov
5b7bdc5838
Add error annotations on test data where errors are expected.
2020-02-03 12:00:44 +01:00
Fedor Isakov
391c9053b5
Apply migrations after switch to MPS 193. Regenerate project.
2020-02-03 11:24:22 +01:00
Fedor Isakov
fa7532f34f
Include origin features's hash to requiredHash when building rules.
...
This enables to adequately reflect changes in the model when it is updated
by editor actions, such as "side transform".
Three tests was broken as the result of this fix and are disabled
http://127.0.0.1:63320/node?ref=r%3A8d22f6d9-72f0-49ec-92ee-027a87fbedd4%28jetbrains.mps.baseLanguageExt.test.incremental%40tests%29%2F3095008005741803340
2020-01-02 17:42:38 +01:00
Fedor Isakov
1e9e41601a
Add method to RuleEx that had been removed from the superclass.
2020-01-02 17:20:13 +01:00
Grigorii Kirgizov
955c814c3c
Add test for now failing cases of nested generics (filed MPSCR-29)
2019-12-26 19:13:17 +03:00
Grigorii Kirgizov
1b79c2b548
Check compatability for eq/neq operators, forbid null to prim conversion (MPSCR-3)
...
Introduced a variation of conversion relation with a bit stricter boxing, needed for eq/neq.
e.g. suppose { (Number n, float f) => n == f } here f shouldn't be boxed.
2019-12-26 17:57:59 +03:00
Grigorii Kirgizov
52af2d527a
Complete subtyping for array types (A[] <: Serializable, Cloneable; JLS 4.10.3) (MPSCR-3)
2019-12-25 14:11:01 +03:00
Grigorii Kirgizov
e4b927e6e6
stringType: make it a sub-dataform of classifierType, don't add new rules. Add tests for conversion to/from classifierType and binstr promote. (MPSCR-3)
...
Everywhere where we don't care whether it's <String> or <string> it will be handled just as String.
Where we need to discern between the cases (as in Recover), 'stringType()' dataform can be matched first.
2019-12-25 14:09:48 +03:00
Grigorii Kirgizov
a2f8f5e6f3
Handle cases with free & inference variables in containment, remove few unneeded rules (MPSCR-11)
...
Remove rules which handle capture+inference var case separately: it's already handled.
Remove rule with error on bound which shouldn't be triggered with new hasBound semantics.
Add symmetric rule for case value+inference var: types can be inferred nevermind relation direction.
Add rules for free vars without bounds (these ain't inference vars). Need in such vars arise when
e.g. params in classifierType terms must be somehow accessed. It's used in MethodCall rules.
2019-12-24 19:21:33 +03:00
Grigorii Kirgizov
8744263cb4
Add more tests for containment relation, remove some found unsound rules (MPSCR-11)
...
Rules removed are concerned with type variables. JLS [4.5.1] doesn't define containment for them.
2019-12-24 17:27:52 +03:00
Grigorii Kirgizov
76859dc69a
Provide required info for return ty inference or assign Object type. Fixes minor MPSCR-27
...
During investigation a different issue has been found.
Currently, e.g. when checking args to a method call, if there's an error then inference variable remains free.
It allows to continue typechecking without spurious additional errors triggered by former ones,
but with this approach all relations must gracefully handle free vars, and it's more difficult to avoid "no type".
There's an alternative to always assign to inference var a type at hand, even it doesn't pass checks
-- but then there're more unneccessary errors. Both approaches seem valid, no action is taken now.
2019-12-24 13:48:06 +03:00
Grigorii Kirgizov
455f69f499
Fix miising import of lang.text in tests
2019-12-19 00:59:09 +03:00
Grigorii Kirgizov
3495cb4c2a
Fix checking of raw new class / anon class. Thinlet now passes.
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
f2b35764d9
Explicitly match on hasBound in convertsTo rules (it's not reactivated as should)
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
7d582df9dc
Extend and clean up tests for bounds/capture type checking (Bounds sample)
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
9347cbf8ca
Fix captureOf_upperBound_check rule to handle typeVariableType case. Add check for captureOf_lowerBound
...
Errors are now reported on ClassifierType instead of type argument, because some checks must be done
in captures and there's no proper way to specify origin of arg here.
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
bced911edf
Add tests for capture logic of bl typesystem
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
6ac8390e77
Remove error feedback from classifierType altogether: always produce some type
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
a460459702
Require declared type check for local tc of Expression.
...
E.g. method calls can rely on it for return type inference.
2019-12-18 21:47:07 +03:00
Grigorii Kirgizov
76c6ee052a
Switch error reporting on arg types from 'origin' to 'convertsToSafe' in method call rules.
...
'origin' works only when wrapping whole ConstraintRule-s, not individual constraint activation statements.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
fa129f5937
Add test case for capture & containment. One case fails.
2019-12-18 21:47:05 +03:00
Fedor Isakov
dfecccfb86
Fixup ArgumentsCollector: include forgotten model changes, fix the build.
2019-12-11 12:00:51 +01:00
Fedor Isakov
b182cf60d7
Revert "Temporarily ignore failing tests."
...
This reverts commit 7776f97fe7 .
2019-11-26 23:09:40 +01:00
Fedor Isakov
7776f97fe7
Temporarily ignore failing tests.
...
The tests presumably fail because of a broken contract that is used
in the typesystem implementation, namey that a logical variable
contained by an constraint argument-term (as opposed to being an
argument itself) reactivates the constraint on ground/parent change
event. This assumption is false, thereby the implementation needs
to be adjusted keep compatibility with the contract.
2019-11-24 13:34:59 +01:00
Fedor Isakov
1e068abe13
Repackage typechecking tests to separate module.
...
All test data (code) to be contained in j.m.blExt.test module.
The samples are to be kept separately with generation on to demonstrate fewer false negatives
of the new typechecker.
2019-11-06 21:14:12 +01:00
Fedor Isakov
6372f5a4a4
Experimental: cache the results of convertsTo/coerceTo queries.
...
The cache is repository-local and is invalidated on every command in that repository.
2019-10-12 09:35:09 +02:00
Grigorii Kirgizov
cdfe1f2c0c
Update language version after migrations from mps.logic lang
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
087bfdaf9b
Extend LubHelper to collect all parameterizations of erased types from raw LUB
2019-09-11 13:24:01 +03:00
Fedor Isakov
19b243adf5
Support coerce to concept query in bl types aspect. Testing typechecking in bl.
2019-08-12 16:45:00 +02:00
Fedor Isakov
66c9222a95
Run migrations with MPS 2019.2 EAP3.
2019-07-26 17:27:18 +02:00
Fedor Isakov
79b08c6f83
Revert "Apply migrations from EAP3 and rebuild project."
...
This reverts commit 9c5bf858c3 .
2019-07-26 15:30:30 +02:00
Fedor Isakov
9c5bf858c3
Apply migrations from EAP3 and rebuild project.
2019-07-19 12:28:27 +02:00
Fedor Isakov
cd37daaa07
Apply migrations after switching to the latest EAP build of MPS.
2019-06-07 09:16:21 +02:00
Fedor Isakov
17ed4642ae
Apply all available automatic migrations.
2019-06-05 16:16:00 +02:00
Fedor Isakov
fc1fcaaf9d
Cleanup a test: better layout of nested lists.
2019-01-21 11:20:30 +01:00
Fedor Isakov
f226bea8c2
Minor fixes in the BL typechecking templates. Insert manual new lines in the test structures for better visualization.
2019-01-09 13:01:37 +01:00
Fedor Isakov
361fff7ec5
Drop usages of ListLiteral in tests. Testing BL typesystem.
2019-01-04 17:47:02 +01:00
Fedor Isakov
2fd4545be4
BL typechecking: simplifying promote (subclassing relation), implement LUB as raw types intersection, better support for raw classier types
2019-01-03 17:16:47 +01:00
Fedor Isakov
19ce84f7ef
Switch to 2018.3 RC. Apply all migrations.
2018-11-28 16:48:59 +01:00
Fedor Isakov
6788bcf7a1
Switch to latest reactor, update the API calls. Support EvaluationFailure and FailureHandler.
2018-11-04 13:10:40 +01:00
Fedor Isakov
075b34e24d
Replacing usages of deprecated concepts. Minor fixes.
2018-09-11 17:01:45 +02:00
Fedor Isakov
ea9919f38a
Bring the hierarchy of DataForm concepts in line with the runtime.
...
Merge DataForm constructors into logic language.
Repackaging logic runtime.
Drop obsolete code.
2018-07-21 13:29:22 +02:00
Fedor Isakov
c12bf0d96a
Ensure extracted baseLanguageExt stuff can be built from command line.
2018-07-17 15:09:47 +02:00
Fedor Isakov
92c6ba3e12
Restructuring the project: consolidate code, moving samples away.
2018-07-14 17:22:07 +02:00