@@ -0,0 +1,2072 @@
+/*%0A * Copyright (C) 2014-2015 the original authors or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.sarl.lang.tests.bugs;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport io.sarl.lang.SARLInjectorProvider;%0Aimport io.sarl.lang.sarl.SarlScript;%0Aimport io.sarl.tests.api.AbstractSarlTest;%0A%0Aimport org.eclipse.xtext.junit4.InjectWith;%0Aimport org.eclipse.xtext.junit4.XtextRunner;%0Aimport org.eclipse.xtext.junit4.util.ParseHelper;%0Aimport org.eclipse.xtext.junit4.validation.ValidationTestHelper;%0Aimport org.eclipse.xtext.util.IAcceptor;%0Aimport org.eclipse.xtext.xbase.XbasePackage;%0Aimport org.eclipse.xtext.xbase.compiler.CompilationTestHelper;%0Aimport org.eclipse.xtext.xbase.compiler.CompilationTestHelper.Result;%0Aimport org.eclipse.xtext.xbase.validation.IssueCodes;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport com.google.inject.Inject;%0A%0A/**%0A * @author $Author: sgalland$%0A * @version $FullVersion$%0A * @mavengroupid $GroupId$%0A * @mavenartifactid $ArtifactId$%0A */%0A@SuppressWarnings(%22all%22)%0Apublic class Bug295 extends AbstractSarlTest %7B%0A%0A%09private String snippet = multilineString(%0A%09%09%09%22capacity C1 %7B%22,%0A%09%09%09%22    def fct(a : Object=null, b : int=0, c : Object*)%22,%0A%09%09%09%22%7D%22,%0A%09%09%09%22agent A1 %7B%22,%0A%09%09%09%22    uses C1%22,%0A%09%09%09%22    def mytest %7B%22,%0A%09%09%09%22        fct(new Object)%22,%0A%09%09%09%22    %7D%22,%0A%09%09%09%22%7D%22,%0A%09%09%09%22%22);%0A%0A%09@Test%0A%09public void bug295() throws Exception %7B%0A%09%09SarlScript mas = file(snippet);%0A%09%09validate(mas).assertError(%0A%09%09%09%09XbasePackage.eINSTANCE.getXFeatureCall(),%0A%09%09%09%09IssueCodes.AMBIGUOUS_FEATURE_CALL,%0A%09%09%09%09117, 3,%0A%09%09%09%09%22both match%22);%0A%09%7D%0A%0A%7D%0A

Add unit test for ambiguous function calls.