Add test regarding assignment and polymorphism
This commit is contained in:
parent
94c9e83d06
commit
d19c64845d
1 changed files with 14 additions and 0 deletions
|
@ -195,3 +195,17 @@ mod CD.
|
||||||
let alpha: A.Foo
|
let alpha: A.Foo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## A polymorphic function is properly generalized when assigned to a new variable
|
||||||
|
|
||||||
|
```
|
||||||
|
let id x = x
|
||||||
|
let id2 = id
|
||||||
|
let id3 = id
|
||||||
|
|
||||||
|
id3 1
|
||||||
|
id3 "bla"
|
||||||
|
|
||||||
|
id2 1
|
||||||
|
id2 "bla"
|
||||||
|
````
|
||||||
|
|
Loading…
Reference in a new issue