groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulk-asert <...@git.apache.org>
Subject [GitHub] groovy pull request #708: GROOVY-6668: Static compiler doesn't coerce GStrin...
Date Thu, 17 May 2018 03:51:46 GMT
Github user paulk-asert commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/708#discussion_r188832656
  
    --- Diff: src/test/groovy/bugs/Groovy6668Bug.groovy ---
    @@ -0,0 +1,65 @@
    +/*
    + *  Licensed to the Apache Software Foundation (ASF) under one
    + *  or more contributor license agreements.  See the NOTICE file
    + *  distributed with this work for additional information
    + *  regarding copyright ownership.  The ASF licenses this file
    + *  to you 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.
    + */
    +package groovy.bugs
    +
    +class Groovy6668Bug extends GroovyTestCase{
    +    void testGroovy6668() {
    +        assertScript '''
    +        @groovy.transform.CompileStatic
    +        class OtherThing {
    +            OtherThing() {
    +                Map<String, String> m = [:]
    +                def k = "foo"
    +                m["$k"].toUpperCase()
    +            }
    +        }
    +        
    +        OtherThing
    --- End diff --
    
    why not just shouldCompile then?


---

Mime
View raw message