Fredrik Høisæther Rasch
392f025148
Error Message if CC invocation fails ( #5663 )
2017-04-08 19:06:19 +02:00
Zahary Karadjov
34c34cb49b
move the object construction logic to a separate file
2017-04-06 00:46:18 +03:00
Zahary Karadjov
f162214d5d
object construction: test cases and manual additions
2017-04-06 00:46:18 +03:00
Zahary Karadjov
564c0acae2
cleaned up the code and implemented proper error messages
2017-04-06 00:46:18 +03:00
Zahary Karadjov
6edb07091d
fix #4556
...
This implements a number of new safety checks and error messages
when object constructors are used:
In case objects:
* the compiler will prevent you from initializing fields in
conflicting branches
* When a field from a particular branch is initialized, the
compiler will demand that the discriminator field is also
supplied with a maching compile-time value
In all objects:
* When the "requiresInit" pragma is applied to a type, all fields
of the type must be initialized when object construction is used.
The code will be simplified in a follow up commit.
2017-04-06 00:45:12 +03:00
Andreas Rumpf
88c4d6aabe
fix another compiler regression
2017-04-05 11:32:23 +02:00
Andreas Rumpf
ac81a99892
make tests green again
2017-04-04 18:05:53 +02:00
Andreas Rumpf
bfaa329680
Merge branch 'devel' into araq
2017-04-04 13:38:41 +02:00
Andreas Rumpf
0b79a2b02e
attempt to make tests green again
2017-04-04 13:28:15 +02:00
Andreas Rumpf
e21ca54b11
assignments support ': stmtList' like let/var do
2017-04-04 12:20:43 +02:00
Araq
87732f797c
fixes #5638
2017-04-04 12:08:34 +02:00
Araq
e105c04e49
revert PR #5638 because it breaks code
2017-04-04 10:43:54 +02:00
Andreas Rumpf
08f5087d2c
remove the need for the .procvar annotation
2017-04-03 16:35:41 +02:00
Andreas Rumpf
e8cfa14354
de-deprecate silly warning about non-exhaustive string case statments
2017-04-03 12:28:06 +02:00
Andreas Rumpf
f520dfbfab
remove en-dash from the language
2017-04-02 23:41:29 +02:00
Andreas Rumpf
d587b6a25f
language addition: colon-block for expressions in let/var context
2017-04-02 23:38:55 +02:00
Anatoly Galiulin
5fdd03ad4d
Fixed issue #5638 ( #5639 )
2017-04-01 14:14:34 +02:00
Emery Hemingway
7e351fc7fa
support for the Genode OS framework ( #5560 )
2017-03-31 23:13:06 +02:00
Silvio
2946c7a4b9
Implementing repr for JS ( #5578 )
2017-03-31 22:00:48 +02:00
andri lim
2f9a698e87
attempt to fix #5632 typedesc typeRel regression ( #5634 )
2017-03-31 21:58:26 +02:00
andri lim
fce4b7cd62
attempt to fix #5621 #5615 generic ref object typeRel ( #5633 )
2017-03-31 21:58:09 +02:00
Andreas Rumpf
d7eb146d28
make pragma expression parsing use the same parser mechanism as elsewhere
2017-03-31 17:03:15 +02:00
Andreas Rumpf
529609f7ed
Merge remote-tracking branch 'origin/concepts-rebased' into araq
2017-03-31 16:40:21 +02:00
Zahary Karadjov
c11d7c35dd
make all tests green again
...
properly disabling the extra diagnostics in semCompiles proved to
be too much work. I have some plans for further improving the error
messages in the future and I'll revisit this later.
2017-03-31 01:53:11 +03:00
Zahary Karadjov
a74ad869e9
requested code review changes
2017-03-29 16:15:30 +03:00
Andreas Rumpf
720eca5744
added a codegen note
2017-03-29 10:58:01 +02:00
Andreas Rumpf
b58fbd1b48
fixes #5618
2017-03-28 20:57:34 +02:00
Zahary Karadjov
01bc5f32d6
Fix the compilation of the emmy package
2017-03-28 01:58:54 +03:00
Andreas Rumpf
d02486aa48
compiler: better error messages ( #5613 )
2017-03-26 20:24:06 +02:00
Andreas Rumpf
1268ca79e5
fixes #5599 ( #5610 )
2017-03-26 09:30:59 +02:00
Zahary Karadjov
7fdf29937d
fix tgenericshardcases
2017-03-24 17:07:30 +02:00
Zahary Karadjov
9574d318ae
use lower-case proc names
2017-03-24 17:03:55 +02:00
Zahary Karadjov
c605d57574
restore compilation and make all concepts tests green
2017-03-24 17:03:55 +02:00
Zahary Karadjov
d6d548c32f
carefully reviewed and merged the changes from the devel branch
2017-03-24 17:03:55 +02:00
Zahary Karadjov
cbf66e99a8
Working test cases for the sophisticated matrix library example from the manual
...
Fixed the dot operator when used within return types (see tgenericdotrettype)
Fixed the matching of generic concepts aliases used with the implicit generics style
2017-03-24 16:59:47 +02:00
Zahary Karadjov
52b241fd57
new type traits: GenericHead and StripGenericParams
2017-03-24 16:59:47 +02:00
Zahary Karadjov
fe48dd1cbe
further improvements to the error messages produced by concepts
2017-03-24 16:59:47 +02:00
Zahary Karadjov
9e9b289fc5
when displaying proc signatures, don't render the implicit generic params
2017-03-24 16:59:47 +02:00
Zahary Karadjov
74a80988d9
proper error reporting for concepts and the introduction of the {.explain.} pragma
2017-03-24 16:59:47 +02:00
Zahary Karadjov
644d645ea7
implement the special treatment of explicit type params in concepts
2017-03-24 16:58:15 +02:00
Zahary Karadjov
0f2c4be129
infer static parameters even when more complicated arithmetic is involved
2017-03-24 16:58:15 +02:00
Zahary Karadjov
0b0a3e5f20
support derived values in non-generic user type classes
2017-03-24 16:58:15 +02:00
Zahary Karadjov
a90c4c4d7e
kill the reportConceptFailures options as it will be replaced by the .explain. pragma
2017-03-24 16:58:15 +02:00
Zahary Karadjov
76c663f692
support for inferring static[T] concept params
2017-03-24 16:58:15 +02:00
Zahary Karadjov
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* Why is tyInferred needed?
The bindings in TCandidate are capable of inferring types within a single
call expression. In concepts, we need to infer types in the same way, but
across the whole body of the concept.
Previously, once a concept type param was inferred, it was destructively
mutated using t.assignType, but this proved to be problematic in the presence
of overloads, because the bindings established while a non-matching overload
is tested must be reverted/forgotten. tyInferred offers a non-destructive way to
keep track of the inference progress.
While introducing new types usually requires a lot of code paths in the compiler
to updated, currently tyInferred is only a short-lived type within the concept body
pass and it's unlikely to introduce breakage elsewhere in the compiler.
2017-03-24 16:58:15 +02:00
Zahary Karadjov
815724db71
support the full range of type modifiers when declaring concept vars and testing proc signatures
2017-03-24 16:58:15 +02:00
Zahary Karadjov
0a9a878bd3
support for matching generic types' procs in generic concepts
2017-03-24 16:58:15 +02:00
Zahary Karadjov
33f4e69759
support for accessing types and consts defined in concepts with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
eab1d0cc02
support for accessing the inferred concept type params with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
66e0f0e19c
concept type params inference working in basic examples
2017-03-24 16:58:15 +02:00