Skip to content

Commit afdc28b

Browse files
author
Quirin Schroll
committed
Add changelog entries
1 parent 76aabfd commit afdc28b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
The term *basic type* is now *primary type*
2+
3+
The parser now uses the term *primary type* for what used to be referred to as *basic type.*
4+
The term *basic type* is used specifically for type expressions that are not immediately recursive.
5+
6+
A *basic type* is a *fundamental type* (those which have keywords)
7+
or a type given by an identifier, a `typeof`, a `mixin`, or a `__traits`.
8+
Absent from this list are `__vector` types and types spelled out using a qualifier and parentheses (e.g. `const(int)`).
9+
10+
A *primary type* is a *basic type* or a `__vector` type or a qualified type.
11+
12+
For the most part, *primary type* is the term you want to use and will see in error messages now.
13+
There are some corners where indeed a *basic type* is required.

changelog/dmd.const-base.dd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Specifying a qualified type as a base class or interface is an error now
2+
3+
A type like `const(Object)` could be used as a base class in the base class list
4+
of a class or interface declaration or of an anonymous class object.
5+
There, qualifiers were simply ignored semantically.
6+
7+
Explicitly qualifying types in base class lists is a parse error now.
8+
9+
This only affects parsing.
10+
If a `mixin` or `typeof` or an identifier is used, nothing changes.
11+
If it resolves to a qualified type,
12+
the qualifier is ignored.
13+
---
14+
class C : const(Object) { } // Parse error now
15+
auto obj = new class const(Object) { }; // Parse error now
16+
---
17+
There is no deprecation period.
18+
The fix is to remove the unnecessary and misleading qualifier from your code.

0 commit comments

Comments
 (0)