Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/vis12/bugs/resolved/bug005.diderot
ViewVC logotype

Annotation of /branches/vis12/bugs/resolved/bug005.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3291 - (view) (download)

1 : jhr 2150 /*! \file bug005.diderot
2 :     *
3 :     * \author John Reppy
4 :     */
5 :    
6 :     /*
7 : jhr 3291 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
8 :     *
9 :     * COPYRIGHT (c) 2015 The University of Chicago
10 : jhr 2150 * All rights reserved.
11 :     */
12 :    
13 :     /* this fails to compile because the parameter name for id is the same as an already declared
14 :     * global.
15 :     *
16 :     * % ../../bin/diderotc --exec bug005.diderot
17 :     * [bug005.diderot:3.19-25] Error: redefinition of 'x', previous definition at [bug005.diderot:1.1-2.0]
18 :     *
19 :     * we should allow this redefinition, since the parameter list is a new scope (do we want a warning?)
20 :     */
21 :    
22 :     real x = 1.0;
23 :    
24 :     function real id (real x) = x;
25 :    
26 :     strand Dummy ()
27 :     {
28 :     output int out = 1;
29 :     update { stabilize; }
30 :     }
31 :    
32 :     initially { Dummy() | i in 1..2 };

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0