From 3a404fef126d6e9f10d0e4148093f8be6cdba408 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 24 Jul 2014 14:10:18 -0400 Subject: [PATCH] tests: add base_gen_final_bound.nit Signed-off-by: Jean Privat --- tests/base_gen_final_bound.nit | 25 +++++++++++++++++++++++++ tests/sav/base_gen_final_bound.res | 1 + 2 files changed, 26 insertions(+) create mode 100644 tests/base_gen_final_bound.nit create mode 100644 tests/sav/base_gen_final_bound.res diff --git a/tests/base_gen_final_bound.nit b/tests/base_gen_final_bound.nit new file mode 100644 index 0000000..57e9aaf --- /dev/null +++ b/tests/base_gen_final_bound.nit @@ -0,0 +1,25 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import end + +interface Object +end + +enum Int +end + +interface A[F: Int] + fun foo: F do return 1 +end diff --git a/tests/sav/base_gen_final_bound.res b/tests/sav/base_gen_final_bound.res new file mode 100644 index 0000000..b5c1f2d --- /dev/null +++ b/tests/sav/base_gen_final_bound.res @@ -0,0 +1 @@ +base_gen_final_bound.nit:23,16--18: Warning: Useless formal parameter type since `Int` cannnot have subclasses. -- 1.7.9.5