Skip to content

Commit

Permalink
cleanup PR #14048
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Apr 21, 2020
1 parent 1b6c4ed commit dd24004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
and `ioselector_epoll` will no longer be leaked to child processes.

## Language changes
- In newruntime it is now allowed to assign discriminator field without restrictions as long as case object doesn't have custom destructor. Discriminator value doesn't have to be a constant either. If you have custom destructor for case object and you do want to freely assign discriminator fields, it is recommended to refactor object into 2 objects like this:
- In newruntime it is now allowed to assign discriminator field without restrictions as long as case object doesn't have custom destructor. Discriminator value doesn't have to be a constant either. If you have custom destructor for case object and you do want to freely assign discriminator fields, it is recommended to refactor object into 2 objects like this:
```nim
type
MyObj = object
Expand Down Expand Up @@ -62,8 +62,8 @@
```

- getImpl() on enum type symbols now returns field syms instead of idents. This helps
with writing typed macros. Old behavior for backwards compatiblity can be restored
with command line switch `--oldast`.
with writing typed macros. Old behavior for backwards compatiblity can be restored
with command line switch `--useVersion:1.0`.

## Compiler changes

Expand Down
4 changes: 2 additions & 2 deletions compiler/semtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
e.typ = result
e.position = int(counter)
let symNode = newSymNode(e)
if optOldAst notin c.config.options and identToReplace != nil:
if optNimV1Emulation notin c.config.options and identToReplace != nil:
identToReplace[] = symNode
if e.position == 0: hasNull = true
if result.sym != nil and sfExported in result.sym.flags:
Expand Down Expand Up @@ -1590,7 +1590,7 @@ proc applyTypeSectionPragmas(c: PContext; pragmas, operand: PNode): PNode =
discard "User-defined pragma"
else:
let sym = searchInScopes(c, ident)
if sym != nil and sfCustomPragma in sym.flags:
if sym != nil and sfCustomPragma in sym.flags:
discard "Custom user pragma"
else:
# we transform ``(arg1, arg2: T) {.m, rest.}`` into ``m((arg1, arg2: T) {.rest.})`` and
Expand Down

1 comment on commit dd24004

@disruptek
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken build.

Please sign in to comment.