| 
									
										
										
										
											2009-09-20 23:42:40 -04:00
										 |  |  | USING: eval tools.test compiler.units vocabs words | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  | kernel ;
 | 
					
						
							| 
									
										
										
										
											2009-04-26 01:51:47 -04:00
										 |  |  | IN: compiler.tests.redefine8 | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ! Mixin redefinition did not recompile all necessary words. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ [ "compiler.tests.redefine8" forget-vocab ] with-compilation-unit ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2009-09-20 23:42:40 -04:00
										 |  |  |     "USING: kernel math math.order sorting ;
 | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  |     IN: compiler.tests.redefine8 | 
					
						
							|  |  |  |     MIXIN: my-mixin | 
					
						
							|  |  |  |     INSTANCE: fixnum my-mixin | 
					
						
							|  |  |  |     GENERIC: my-generic ( a -- b )
 | 
					
						
							|  |  |  |     ! We add the bogus quotation here to hinder inlining | 
					
						
							|  |  |  |     ! since otherwise we cannot trigger this bug. | 
					
						
							| 
									
										
										
										
											2009-09-20 23:42:40 -04:00
										 |  |  |     M: my-mixin my-generic 1 + [ [ <=> ] sort ] drop ;" | 
					
						
							|  |  |  |     eval( -- ) | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2009-09-20 23:42:40 -04:00
										 |  |  |     "USE: math | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  |     IN: compiler.tests.redefine8 | 
					
						
							| 
									
										
										
										
											2009-09-20 23:42:40 -04:00
										 |  |  |     INSTANCE: float my-mixin" | 
					
						
							|  |  |  |     eval( -- ) | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ 2.0 ] [ | 
					
						
							| 
									
										
										
										
											2011-11-06 18:57:24 -05:00
										 |  |  |     1.0 "my-generic" "compiler.tests.redefine8" lookup-word execute
 | 
					
						
							| 
									
										
										
										
											2008-08-30 01:05:27 -04:00
										 |  |  | ] unit-test |