summary refs log tree commit diff stats
path: root/tests/generics/t13525.nim
blob: 1fd84852bfbc88aefaa0c400d91852fe2f7c6e68 (plain) (blame)
1
2
3
4
5
6
# https://github.com/nim-lang/Nim/issues/13524
template fun(field): untyped = astToStr(field)
proc test1(): string = fun(nonexistent1)
proc test2[T](): string = fun(nonexistent2) # used to cause: Error: undeclared identifier: 'nonexistent2'
doAssert test1() == "nonexistent1"
doAssert test2[int]() == "nonexistent2"
snow.py?h=v1.9.3&id=9dc6fe07975ef2d489e5071f4e6d7223a33cb3b3'>^
5805deca ^
f027adc0 ^
7df5bc1f ^



3cf84539 ^

5805deca ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
                                                                       
                                                                        
 
                                              
                              
 
                        
                               
                                             
 

                                 
 
                                        




                                              
                                             
                                            
 



                                                                          

                                       
                                   
# Copyright (C) 2009, 2010, 2011  Roman Zimbelmann <romanz@lavabit.com>
# This software is distributed under the terms of the GNU GPL version 3.

from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *

class Snow(ColorScheme):
	def use(self, context):
		fg, bg, attr = default_colors

		if context.reset:
			pass

		elif context.in_browser:
			if context.selected:
				attr = reverse
			else:
				attr = normal

			if context.directory:
				attr |= bold

		elif context.highlight:
			attr |= reverse

		elif context.in_titlebar and context.tab and context.good:
			attr |= reverse

		return fg, bg, attr