mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
Merge branch 'devel' into sighashes
This commit is contained in:
25
tests/ccgbugs/tmissingderef2.nim
Normal file
25
tests/ccgbugs/tmissingderef2.nim
Normal file
@@ -0,0 +1,25 @@
|
||||
discard """
|
||||
output: "c"
|
||||
"""
|
||||
|
||||
# bug #5079
|
||||
|
||||
import tables, strutils
|
||||
|
||||
type Test = ref object
|
||||
s: string
|
||||
|
||||
proc `test=`(t: Test, s: string) =
|
||||
t.s = s
|
||||
|
||||
var t = Test()
|
||||
|
||||
#t.test = spaces(2) # -- works
|
||||
|
||||
var a = newTable[string, string]()
|
||||
a["b"] = "c"
|
||||
|
||||
#t.s = a["b"] # -- works
|
||||
#t.test a["b"] # -- works
|
||||
t.test = a["b"] # -- prints "out of memory" and quits
|
||||
echo t.s
|
||||
14
tests/ccgbugs/tobjconstr_regression.nim
Normal file
14
tests/ccgbugs/tobjconstr_regression.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
output: "@[(username: user, role: admin, description: desc, email_addr: email), (username: user, role: admin, description: desc, email_addr: email)]"
|
||||
"""
|
||||
|
||||
type
|
||||
User = object of RootObj
|
||||
username, role, description, email_addr: string
|
||||
|
||||
# bug 5055
|
||||
let us4 = @[
|
||||
User(username:"user", role:"admin", description:"desc", email_addr:"email"),
|
||||
User(username:"user", role:"admin", description:"desc", email_addr:"email"),
|
||||
]
|
||||
echo us4
|
||||
@@ -8,4 +8,7 @@ discard """
|
||||
import jester
|
||||
import asyncdispatch, asyncnet
|
||||
|
||||
# bug #5081
|
||||
#import nre
|
||||
|
||||
echo "hello"
|
||||
|
||||
6
tests/modules/UpperCased.nim
Normal file
6
tests/modules/UpperCased.nim
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
# bug #5076
|
||||
|
||||
var str*: string
|
||||
|
||||
UpperCased.str = "hello"
|
||||
8
tests/modules/tuppercased.nim
Normal file
8
tests/modules/tuppercased.nim
Normal file
@@ -0,0 +1,8 @@
|
||||
discard """
|
||||
output: "hello"
|
||||
"""
|
||||
|
||||
import UpperCased
|
||||
|
||||
# stress normalization rules:
|
||||
echo Upper_Cased.str
|
||||
Reference in New Issue
Block a user