diff --git a/uts/symtbl/enumeration.casm b/uts/symtbl/enumeration.casm index 0362fa72..74cd2935 100644 --- a/uts/symtbl/enumeration.casm +++ b/uts/symtbl/enumeration.casm @@ -29,7 +29,5 @@ enum ABC = { A, B, C } rule foo = { - print( A ) - program( self ) := undef } diff --git a/uts/symtbl/enumeration_uses.casm b/uts/symtbl/enumeration_uses.casm new file mode 100644 index 00000000..f55418bc --- /dev/null +++ b/uts/symtbl/enumeration_uses.casm @@ -0,0 +1,39 @@ +// +// Copyright (c) 2014-2017 CASM Organization +// All rights reserved. +// +// Developed by: Philipp Paulweber +// Emmanuel Pescosta +// https://github.com/casm-lang/libcasm-tc +// +// This file is part of libcasm-tc. +// +// libcasm-tc is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// libcasm-tc is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with libcasm-tc. If not, see . +// + + +CASM init foo + +enum ABC = { A, B, C } + +rule foo = +{ + let x = ABC.A in skip + + let x : ABC = ABC.B in skip + + let x : ABC = .C in skip + + program( self ) := undef +}