Files
Nim/doc
Ivan Bobev 3c85aa9e53 Make {.requiresInit.} to work for distinct types (#15869)
Make `requiresInit` pragma to work for distinct types in addition to
objects. Tagging of distinct types with `requiresInit` pragma was
already supported, but its impact wasn't applied. Now its behavior when
applied on distinct types is as follows.

Given the following distinct type definitions:

  ```nim
  type
    DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject
    DistinctString {.requiresInit.} = distinct string
  ```

The following code blocks will fail to compile:

  ```nim
  var foo: DistinctFoo
  foo.x = "test"
  doAssert foo.x == "test"
  ```

  ```nim
  var s: DistinctString
  s = "test"
  doAssert s == "test"
  ```

But these ones will compile successfully:

  ```nim
  let foo = DistinctFoo(Foo(x: "test"))
  doAssert foo.x == "test"
  ```

  ```nim
  let s = "test"
  doAssert s == "test"
  ```
2020-11-06 18:56:09 +00:00
..
2020-06-28 19:17:18 +02:00
2020-10-26 13:47:33 -04:00
2020-11-05 14:56:44 +01:00
2020-10-20 10:51:50 +02:00
2014-08-28 22:36:14 +02:00
2018-11-14 08:27:48 +01:00
2020-10-28 17:56:56 +01:00
2020-06-28 19:17:18 +02:00
2020-10-20 10:51:50 +02:00
2020-10-20 10:51:50 +02:00
2020-10-20 10:51:50 +02:00
2019-10-22 17:59:12 -07:00
2016-10-24 12:20:51 +02:00
2020-09-21 12:37:14 +02:00
2019-01-30 19:49:09 +01:00
2019-10-22 17:59:12 -07:00
2020-10-20 10:51:50 +02:00
2020-10-31 17:47:09 +01:00

============================
Nim's documenation system
============================

This folder contains Nim's documentation. The documentation
is written in a format called *reStructuredText*, a markup language that reads
like ASCII and can be converted to HTML automatically!